GlassFish Server Open Source Edition


See Set up Agents for information on installing the agent.


Instructions on this page use <GlassFishHome> to denote your GlassFish installation folder.

GlassFish 3.1 / 4.0

The following steps describe how to configure AppMon to diagnose applications on Oracle GlassFish 3 (using Java 1.6) and GlassFish 4 (using Java 1.7).

  1. Start the Oracle GlassFish using the Graphical User Interface or the command line.
    Linux command line example: <GlassFishHome>/bin/asadmin start-domain domain1 Windows command line example: <GlassFishHome>/bin/asadmin.bat start-domain domain1
  2. Open the Admin Console use the URL http://localhost:4848/. When accessing the server remotely, specify the machine's hostname rather than localhost.
  3. Enter your user name and password, and then log in.
  4. Navigate to Configurations > [server-config] > JVM Settings > JVM Option > Add JVM Option. Oracle GlassFish Administration Console
  5. In the resulting empty text field, enter one of the following:
    • Linux: -agentpath:<DT_HOME>/agent/lib/<AgentName>,server=<dynaTraceCollectorName>
    • Windows: -agentpath:<DT_HOME>\agent\lib\\dtagent.dll=name=<AgentName>,server=<dynatraceCollectorName>
  6. Save the configuration changes and restart the server.

You can also set domain.xml as (<GlassFishHome>\domains\<domainname>\config\domain.xml) as shown in the following examples:

<java-config classpath-suffix="" system-classpath="" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009">
-->     <jvm-options>-agentpath:<DT_HOME>/agent/lib/<AgentName>,server=<dynaTraceCollectorName></jvm-options>