GlassFish is a reference J2EE implementation. It uses OSGi for modularity and Grizzly as web container. Both HTTP and EJB. There is also partial support for GlassFish default REST implementation. All common things, eg. SQL, JMS or LDAP are available as soon as proper scripts are added to scripts
option in zorka.properties
.
Zorka has been tested on GlassFish 4.0. It might require additional tweaks for previous versions.
Agent Installation
Single server, single domain is the easiest installation scenario:
- unpack zorka binary distribution in glassfish instance directory
${com.sun.aas.instanceRoot}/zorka
; - add the following entry to
${com.sun.aas.instanceRoot}/config/server.policy
file:
// Zorka agent permissions
grant codeBase "file:${com.sun.aas.instanceRoot}/zorka/-" {
permission java.security.AllPermission;
};
- in add the following JVM options to
java-config
nodes in${com.sun.aas.instanceRoot}/config/default.xml
(secondoption is needed only when JDK7 is used):
<jvm-options>-javaagent:${com.sun.aas.instanceRoot}/zorka/zorka.jar=${com.sun.aas.instanceRoot}/zorka</jvm-options>
<jvm-options>-XX:-UseSplitVerifier</jvm-options>
- add agent packages to OSGI boot delegation path (either in
${com.sun.aas.instanceRoot}/config/osgi.properties
orin${com.sun.aas.installRoot}/config/osgi.properties
- instance root file has higher priority):
org.osgi.framework.bootdelegation=${eclipselink.bootdelegation}, \
com.sun.btrace, com.sun.btrace.*, \
org.netbeans.lib.profiler, org.netbeans.lib.profiler.*, \
com.jitlogic.zorka.core.spy, com.jitlogic.zorka.core.spy.*
- start (or restart) server instance;
cd $GLASSFISH_HOME
./asadmin stop-domain ; ./asadmin start-domain
In case of multi-instance domain, each instance needs to have its own zorka directory, configured in an independent manner.
HTTP instrumentation for embedded Grizzly servlet container can be explicitly disabled by adding http.instrument.grizzly = no
in zorka.properties
.