Status of JEP159?
Robbin Ehn
robbin.ehn at oracle.com
Mon Oct 16 15:59:45 UTC 2017
On 10/16/2017 05:44 PM, Alan Bateman wrote:
> On 16/10/2017 14:55, Robbin Ehn wrote:
>>
>> There is actually an issue, we start all transformation with 'on' disk version.
>> If the agent that did the addition of a public method e.g. exits(removeTransformer) we can never re-transform it, instead we get:
>> "error method delete"
>> It have been suggested that we should use 'first published' class version as a baseline (the version after CFLH), but would break current agents (I assume).
>>
>> :
>> Is it a bug or work as intended? (or a bug we can't fix)
> If all agents (or JVM TI environments) are retransformation capable then retransformClasses should send the initial class file bytes (or the "on disk" version as you termed
> it) to the CFLH of the first agent. If a retransformation capable agent adds a method in the initial load then it should add it again when called to retransform the class.
>
> On the other hand, if there are retransformation incapable agents in picture then the class file bytes sent to the CFLH of the first retransformation capable agent will be
> the class bytes from the output from the retransformation incapable agents. So if retransformation incapable agent adds a method in the initial load then that method will
> exist in the class bytes that the retransformation capable agents see when they retransform.
I see, in my case it's several CFLH agents with retransformation capability. The one that added the public method is removed and no longer called.
Leaving the other agents without the ability to retransform anymore since they get the class file bytes without the public method.
/Robbin
>
> -Alan
More information about the serviceability-dev
mailing list