Red Hat JBoss and WildFly
Please refer to the Proposed Directory Structure section in this document for assistance with the steps below.
Running in Standalone Mode
-
Go to
<absolute-path-to-jboss>/bin
. -
If using JBoss Application Server 7.x or Enterprise Application Server 6.x or later, open the
standalone.conf
(Linux) orstandalone.conf.bat
(Windows) file. -
If using JBoss 4.x or 5.x, open the
run.conf
(Linux) orrun.conf.bat
(Windows) file. -
Search for the following line.
# Specify options to pass to the Java VM.
-
Set
JAVA_OPTS
under that line.- On Linux:
JAVA_OPTS="-javaagent:/opt/waratek/agent/waratek.jar -Dcom.waratek.OceanicProperties=/opt/waratek/<conf_*>/<name of property file> $JAVA_OPTS"
- On Windows:
set JAVA_OPTS="-javaagent:<absolute-path-to-agent-home-folder>\agent\waratek.jar -Dcom.waratek.OceanicProperties=<absolute-path-to-agent-home-folder>\<conf_*>\<name of property file> %JAVA_OPTS%"
Additional JAVA_OPTS are required if using JBoss EAP server version 8+ or WildFly version 15+.
For JBoss EAP 8+ and WildFly15+,
-Dsun.util.logging.disableCallerCheck
,-Djava.util.logging.manager
, and-Djboss.modules.system.pkgs
options must be specified inJAVA_OPTS
. In addition, the classpath has to be modified for the Waratek Agent to get attached.-Xbootclasspath/a
should be set to include the path tojboss-logmanager-x.x.xx.Final-redhat-xxxxx.jar
and towildfly-common-x.x.x.Final-redhat-xxxxx.jar
. For example, for a JBoss EAP 8.0 server on Linux these additional options are;-Dsun.util.logging.disableCallerCheck=true /
-Djava.util.logging.manager=org.jboss.logmanager.LogManager /
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager /
-Xbootclasspath/a:<absolute/path/to/jboss_eap_8_0>/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.19.Final-redhat-00001.jar:<absolute/path/to/jboss_eap_8_0>/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.6.0.Final-redhat-00001.jarThe logmanager and wildfly-common jarfile names, versions, and paths will vary depending on the JBoss/WildFly installation. Note, on Windows take care to use a semi-colon as the path separator between jarfiles in
-Xbootclasspath/a
, e.g.-Xbootclasspath/a:<D:\path\to\jboss_eap_8_0>\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.19.Final-redhat-00001.jar;<D:\path\to\jboss_eap_8_0>\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.6.0.Final-redhat-00001.jar
-
Restart the JBoss / Wildfly server. The server must be restarted for the changes to take effect.