Install Java Agent on Glassfish server 3.x & above
For standalone setup:
- Extract the zip file to a new directory outside the glassfish server directory.
- Open apminsight.conf file in any text editor and add license.key value, which can be obtained from Site24x7 APM Insight page. Refer here to fine tune the agent settings.
- Open the administrative console of your glassfish server. Select Configurations and select the configuration used by the server.
- Select JVM Settings > Add JVM Option, then add the following parameter:
-javaagent:<agent_directory_full_path>/apminsight-javaagent.jarFor Example: -javaagent:D:/apminsight/apminsight-javaagent.jar - Open the osgi configuration file, which can be found in either of the paths
/glassfish/config/osgi.propertiesFind the key org.osgi.framework.bootdelegation and append com.manageengine.* to the existing values
or/glassfish/osgi/felix/conf/config.properties - Click Save button and start the glassfish server
For cluster setup:
- Extract the zip file to a new directory outside the glassfish server directory
- Copy the apminsight-javaagent.jar file from above directory to <GLASSFISH_HOME>\glassfish\domains\<domain>\lib\ext directory of the domain server.
- Create a new directory named "apminsight" under <GLASSFISH_HOME>\glassfish\nodes\<node>\<instance> in instance server and copy only the agent conf files to this directory.
- Open apminsight.conf file in any text editor and add license.key value, which can be obtained from Site24x7 APM Insight page. Refer here to fine tune the agent settings.
- Repeat the above step to add the java agent for every instance.
- Open the administrative console of your glassfish server. Select Configurations and select the configuration used by the cluster.
- Select JVM Settings > Add JVM Option, then add the following parameters as such
-javaagent:${com.sun.aas.instanceRoot}/lib/ext/apminsight-javaagent.jar
-Dapminsight.home=${com.sun.aas.instanceRoot}/apminsight - Click Save button and start the glassfish cluster