BytemanPkg is a front-end GUI for Byteman, that constructs a Byteman Rules script file, with the help of template Rules and custom Helpers. All is packaged in a unique jar ( byteman agent, properties, script rule, and mandatory helpers), and uploaded to the target servers.
The running JVM target needs to be instrumented with a javaagent, or with a dynamic install/submit and some other tips depending on the running WAS.
The tested WAS servers are ( need at leat a JVM 1.6) :
JBOSS 7.2 / JBOSS -EAP-6.2 (*1)
JOnAS 5.2.3
TOMCAT 7.0.47 / 6.0.37
WebSphere 8.5.5 (*2)
WebLogic 12c (*3)
GlassFish 4.0 ( JEE7) (*4) needs JVM 1.7.
Eclipse/Jetty 9.1
I have only tested these versions of these WAS, it may run also with others versions with a JVM 1.6+.
(*1) JBOSS and JBOSS-EAP are RedHat trademarks
(*2) IBM® and WebSphere® are IBM trademarks
(*3) Oracle® WebLogic Server is an Oracle trademark
(*4) Glassfish has a dual license https://glassfish.java.net/public/CDDL+GPL.htm
I will test Wildfly ( New Open Source of JBOSS) at the first stable version ( RC or GA).
For every of these WASs, the configugation wil be detailed more further in this document
The product BytemanPkg is a kind of workbench that :
is organized in projects
has a library of Rule templates that can be extended
has for each Rule, if necessary, a custom helper ( that extends MyHelper) or by default MyHelper that extends the build-in helper : org.jboss.byteman.rule.helper.Helper
generates a file script of Byteman Rules ( byteman.btm)
generates a properties file with general parameters and custom parameters for Rule/Helper
packages the custom javagent mybyteman.jar in a unique jar
uploads optionally the javaagent
the javagent can be monitored : start/stop tracing ( using IF Rule statement) , flushing the trace outputs (Custom Helper) by a JMX/RMI connection (JConsole or a script with the Attach API).
(new V1.1) dynamic submission / monitoring in the “Remote Actions” Tab. Only tested on Linux, not tested with others *nix or cygwin.
(new V1.2.0) Adding charting based on JfreeChart
Version 1.2.1 . Improving remote submission with sudo/su on Jsch, correcting bugs with multitheading in Helpers. Charting version 1.1.0. Improving this documentation.
Version 1.2.2 Integrates JDK IBM with javagent and JMX monitoring ( local and remote)
Version 1.2.4.1 Integrates Byteman 2.1.4.1. Improving this documentation.Tested with more WAS and OpenJDK 8.
Version 1.2.4.2 Bug Dynamic submission for System Properties ( Change from pkgbmsubmit.sh to pkgbminstall.sh)
Version 1.2.5 Correcting a Byteman when typeReturn is before a method name. Adding -p <PORT> to pkgbmsubmit.sh and pkgbunmsubmit.shscripts
Version 1.2.6 New ScaChart v 1.1.1 ( improving scale handling in charts)
The tool BytemanPkg is developed in Java 1.7 ( use of JFX for GUI, Oracle JDK 7 needed for JFX, JFX will be certainly introduced with OpenJDK 8 ), but the byte code generated for the agent and helpers is a byte code targeted for JMV 1.6. So the JVM needed for BytemanPkg is a JVM 1.7, and to run javaagent (or submiting by Attach API) on the target WAS, is a JVM 1.6+.
Nota : I have tested also with OpenJDK 8 and OpenJFX 8 ( the Two projects are separated), and it runs also correctly.
The 2 projects must be built and so after downloading a bunch of rpms on my Fedora 19 desktop, I succeeded.
The how-tos are in the 2 Urls below:
OpenJDK => http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html#hg
OpenJFX => https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX
The whole branch master contains a binary archive bytemanPkg.zip that you can install directly.You need to download the entire zip Github archive.
To build, you need Ant or Ant integrated in eclipse KEPLER/JUNO