Bug 237919 - Support instrumentation modules - a way for one module to patch bytecode of others
Support instrumentation modules - a way for one module to patch bytecode of o...
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Module System
8.0
PC Linux
: P1 (vote)
: 8.0
Assigned To: Jaroslav Tulach
issues@platform
: API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-03 12:51 UTC by Jaroslav Tulach
Modified: 2013-11-14 19:53 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2013-11-03 12:51:52 UTC
JDK5 came with generic support for instrumentation: 
http://docs.oracle.com/javase/7/docs/api/java/lang/instrument/package-summary.html
it however requires changes to the way one invokes Java.

NetBeans Platform also needs such kind of patching from time to time, yet it would be better to do it in a modular way. E.g. be able to define a module which can provide transformation behavior which would then be applied to other loaded classes.
Comment 1 Jaroslav Tulach 2013-11-03 12:52:51 UTC
It would be nice to reuse the API already defined by java.lang.instrument package.
Comment 2 Jaroslav Tulach 2013-11-03 13:00:19 UTC
Basic implementation:
http://hg.netbeans.org/ergonomics/rev/1ab79c331145

Y01 Need support for OSGi in Equinox mode

Y02 Need documentation and a use-case description in arch.xml
Comment 3 Jaroslav Tulach 2013-11-03 18:18:31 UTC
Re. Y01: Netbinox now supported: http://hg.netbeans.org/ergonomics/rev/1809b61e5c46
Comment 4 Jaroslav Tulach 2013-11-06 14:17:58 UTC
Intended usage can be seen in following OSGi bundles:
http://source.apidesign.org/hg/html~html4j/rev/86aabecda7a3
one of them defined Agent-Class and hopes that every module/bundle that depends on it will be processed by its JsAgent class.
Comment 5 Jaroslav Tulach 2013-11-13 14:48:13 UTC
I fixed the documentation. Unless there are objections I integrate tomorrow:
http://hg.netbeans.org/ergonomics/rev/b55a0cbcfa6c
Comment 6 Jaroslav Tulach 2013-11-14 19:53:57 UTC
Merged as 6869874b14af to core-main.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo