Help Docs

Install Java Agent on Glassfish server 4.x & above

 

For standalone setup:

    1. Extract the zip file to a new directory outside the glassfish server directory.
    2. 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.
    3. Open the administrative console of your glassfish server. Select Configurations and select the configuration used by the server.
    4. Select JVM Settings > Add JVM Option, then add the following parameter:
      -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar
      For Example: -javaagent:D:/apminsight/apminsight-javaagent.jar
    5. Open the osgi configuration file, which can be found in either of the paths
      /glassfish/config/osgi.properties
      or/glassfish/osgi/felix/conf/config.properties
      Find the key org.osgi.framework.bootdelegation and append com.manageengine.* to the existing valuesInstall APM Java agent on Glassfish
    6. Click Save button and start the glassfish server

For cluster setup:

  1. Extract the zip file to a new directory outside the glassfish server directory
  2. Copy the apminsight-javaagent.jar file from above directory to <GLASSFISH_HOME>\glassfish\domains\<domain>\lib\ext directory of the domain server.
  3. 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.
  4. 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.
  5. Repeat the above step to add the java agent for every instance.
  6. Open the administrative console of your glassfish server. Select Configurations and select the configuration used by the cluster.
  7. 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
    Install APM Java agent on Glassfish
  8. Click Save button and start the glassfish cluster

Was this document helpful?

Shortlink has been copied!