# 1) Make sure you have set JBOSS_HOME environment variable to the correct path to your JBoss EAP # 2) unzip -d $JBOSS_HOME/ byteman.zip # This will create a byteman directory in your $JBOSS_HOME/ # 3) Edit $JBOSS_HOME/bin/standalone.conf # # 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 @1 log reomte ejb calls CLASS ^org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler METHOD processMessage AT INVOKE ExecutorService.submit IF TRUE DO System.out.println("[BYTEMAN-1] Incoming Remote EJB Message from: " + $1.getChannel() + " to EJB Path: " + $appName + "/" + $moduleName + "/" + $distinctName + "/" + $beanName + " method: " + $methodName); ENDRULE