On 19/05/2017 10:20, Rafael Winterhalter wrote:

:

It is the exact purpose of a Java agent to allow the enhancement of a Java application that is independent of a particular Java process. Therefore, it should not be a decission bound to the creation or bundeling of the Java application if such user-site monitoring is required. Instead, it should always be possible to attach a Java agent for a standalone Java process. Also, I cannot find any comment about the Java agent functionality to be optional despite the mentioned change set: https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html - Neither would anybody using the functionality expect it to be optional. I work with agents everyday and this is the first time I hear it.

I don't have time to debate this topic just now but just on optionally, the tool interfaces have always been optional. It might need digging to find all the history but as I recall, in 2004 the then in-progress JSR-163 spec was clarified to make the optionality clear. This is why the JVM TI spec has the statement "JVM TI may not be available in all implementations of the JavaTM virtual machine". The wording in the java.lang.instrument package description wasn't as clear, something that came to light when shaking out the details of Compact Profiles for Java SE 8. This lead to a small clarification [1] that I mentioned.

-Alan.

[1] http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/4a4b97f7f83b

Reply via email to