3 Replies Latest reply on Jan 19, 2015 11:25 AM by Tomaz Cerar

    How to expose javaagent class to applications/modules in Wildfly?

    Jess Holle Newbie

      I have a simple javaagent that I am currently using with Wildfly 8.1.0.

       

      Now, however, I'd like to do further instrumentation where classes in Wildfly modules and/or applications can access the same class instances loaded in the Java agent, i.e. so objects like Instrumentation (or methods using such objects) can be shared from the javaagent to modules and/or applications.

       

      This just works if I have a simple Java application, but the application server and module mechanisms in Wildfly hide these class instances by default -- and I can't figure out how to expose them again.

       

      I have gotten the classes exposed -- that's easy.  What I cannot figure out is how to get the same instances of these classes used by javaagent exposed, i.e. so that the Instrumentation object and other objects and functionalities based on these can be shared with downstream modules and applications.

       

      Any pointers?