Help Docs

Install Java agent on Glassfish server 4.x & above

Note
Refer to this help page for the previous steps.

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 values
  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
  8. Click Save button and start the glassfish cluster

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!