0 Replies Latest reply on Jul 15, 2015 8:44 AM by tiki

    Java Agent Dependencies and Global Modules

    tiki

      Dear Authors,

              We have few java-agents that we are using to inject into JVM for different purposes (instrumentation, light weight threading or attack detection) using -javaagent: added to standalone.conf along with configuration of JBOSS_MODULES_SYSTEM_PKGS.  This java-agents have jar dependencies and those can not be added to the -javaagent and has to be available in root of classloader.

             In WildFly the only way to do this is with global modules as below, but global modules get picked only after the application container and are not available in  classloader.  Thus the javaagent can not find those library.  Can WildFly make it easier for Java Agent to use the global modules as well (is their a workaround and can this be enhancement for future release)? Because currently the java agent in this case require a fat jar creation of every class that it calls and even though the module is available globally it won't use it as it is not on the class path or within the fat jar.  Below is one example of community project that has also ran into this problem https://issues.jboss.org/browse/HWKBTM-24

      <subsystem xmlns="urn:jboss:domain:ee:2.0" >

          <global-modules>

              <module name="org.jboss.logging"

                      slot="main"/>

              <module name="org.apache.log4j"

                      annotations="true"

                      meta-inf="true"

                      services="false" />

          </global-modules>

       

      Regards,

      Pratik Parikh