Installation Glassfish V3
Glassfish allows to run multiple, independently configured application server domains. The default is domain1 and can be found at a location inside the glassfish installation like:
C:\Program Files\Java\glassfishv3\glassfish\domains\domain1
Configuration
To configure this domain for the use of inspectIT, there are two ways via editor and administration console. In both cases you need to copy the agent’s inspecit-agent.jar into the lib\ext directory of the domain:
C:\Program Files\Java\glassfishv3\glassfish\domains\domain1\lib\ext
This is necessary to assure the proper classloader creates the agent classes.
Configuration via editor:
Edit the config\domain.xml file of the domain and add two lines to the java-config element:
<jvm-options>-Dinspectit.config=PATH-TO-INSPECTIT/configuration</jvm-options> <jvm-options>-Xbootclasspath/p:C:/Program Files/Java/glassfishv3/glassfish/domains/domain1/lib/ext/inspectit-agent.jar</jvm-options> <jvm-options>-javaagent:C:/Program Files/Java/glassfishv3/glassfish/domains/domain1/lib/ext/inspectit-agent.jar</jvm-options>
Adjust the inspectit-agent.jar path to your installation location.
Configuration via administration console:
Open the administration console (typically http://localhost:4848/ ), log-in to the server and make sure you are in the right domain.
Then select Configuration>JVM Settings and switch to the tab JVM Options. Here add two JVM Options like above with the proper paths inserted.
Press save.
In both cases you have to restart the server for the changes to take effect. If you have configured your agent properly, you should see a message like
2010-11-04 16:32:24,921 : Trying to register Agent 'CookbookAgent' 2010-11-04 16:32:24,937 : Valid license for Agent 'CookbookAgent' 2010-11-04 16:32:24,937 : Remaining Agent slots: 3 2010-11-04 16:32:24,968 : Successfully registered Agent 'CookbookAgent' with id: 4820 and version 1.2.24
In the CMR console output. Also the inspectIT application should show your agent and the CPU usage of starting the server.