On 02/06/16 14:32, Alan Bateman wrote: > On 02/06/2016 13:53, Andrew Dinn wrote: >> #2 is no good for Java agents which want to (re)transform an already >> loaded class. That's not just an issue for dynamically loaded agents. >> Even when the agent is loaded on the command line it may need to modify >> a class which has already been loaded like, say, class Thread. >> > If we improve the ability to inject new classes into existing modules > then it will work for agents loaded into a running VM too.
Sure, if some improvement were to allow agents to introduce their own classes into a module then that certainly ought to provide the requisite leverage. Are you indicting that this might happen by virtue of some API being added to the JDK? Or are you still expecting agent implementors to come up with a trick to achieve this. I believe I have the latter but i) it is slow and clumsy ii) I am not sure it is thread-safe (I'm concerned about deadlocks) So, a JDK-sanctioned way of doing this would be a big help. regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander