# 1) Make sure you have set JBOSS_HOME environment variable to the correct path to your JBoss EAP # # 2) Extract byteman.zip as "byteman" directory under your $JBOSS_HOME/ # # ~~~ # unzip -d $JBOSS_HOME/ byteman.zip # ~~~ # # 3) Edit $JBOSS_HOME/bin/standalone.conf and add: # # ~~~ # JAVA_OPTS="$JAVA_OPTS -javaagent:/$JBOSS_HOME/byteman/lib/byteman.jar=script:$JBOSS_HOME/byteman/scripts/Log-Remote-EJB-Invocations.btm,boot:$JBOSS_HOME/byteman/lib/byteman.jar -Dorg.jboss.byteman.transform.all=true" # ~~~ # # after this if section: # # ~~~ # if [ "x$JAVA_OPTS" = "x" ]; then # ... # fi # ~~~ # # 4) Startup JBoss and run the test. # RULE EAP 7.0 log reomte ejb calls 1 CLASS ^org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler METHOD processMessage AT INVOKE ExecutorService.submit IF TRUE DO traceln("[BYTEMAN-DEBUG] Incoming Remote EJB Message from: " + $1.getChannel() + " to EJB Path: " + $appName + "/" + $moduleName + "/" + $distinctName + "/" + $beanName + " method: " + $methodName); ENDRULE RULE EAP 7.0 log reomte ejb calls 2 CLASS ^org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler METHOD processMessage AT INVOKE Runnable.run IF TRUE DO traceln("[BYTEMAN-DEBUG] Incoming Remote EJB Message from: " + $1.getChannel() + " to EJB Path: " + $appName + "/" + $moduleName + "/" + $distinctName + "/" + $beanName + " method: " + $methodName); ENDRULE