To load the Java Agent in Mule ESB, pass the Java Agent JAR location as a JVM argument to Mule.
Mule ESB 3.X or later uses the Tanuki configuration environment. To specify JVM arguments in your Mule ESB environment, you need to configure them as additional parameters to the Tanuki Java Service Wrapper configuration file,
wrapper.conf, as described below.
Configuring the Tanuki Service Wrapper
- Open the Java Service Wrapper configuration file:
Find the location indicated for Java Additional Parameters:
Add the path to the Java Agent JAR file as a JVM argument using a
wrapper.java.additional.nparameter, as follows.
Where "n" is the next available integer among the
wrapper.java.additionalparameters already in the
wrapper.conffile, if any. The numbers serve to identify each Java Additional Parameter in the file. Do not skip numbers when adding the property. Replace
path_to_appagentto the path to the
javaagent.jarfile in your system. The
stripquotesparameter is necessary only if there are spaces in the path or filename, but is safe to include if not.
For example, on a Linux system and with seven Java parameters already in the file, add the following properties:
There may be additional
wrapper.java.additionalproperties defined in other Mule files. These are generated by the system. As indicated by comments preceding these properties, you should not make changes directly to the properties. Mule automatically auto-increments the index number for these properties based on the highest integer number used in
wrapper.conf, so you do not need to modify or otherwise account for the index numbers of auto-generated configuration properties.