- delete server/default/deploy/jboss-aop-jdk50.deployer and replace it with jboss-40-install/jboss-aop-jdk50.deployer
- move into the new folder and delete common-softvaluehashmap.jar
(already available) and move javassist.jar to ../../lib/javassist.jar (to replace the jboss providen library)
- edit server/default/deploy/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml and set the EnableLoadtimeWeaving parameter to true
- edit the run.bat or run.sh script and add the java option -javaagent:$JBOSS_HOME/bin/pluggable-instrumentor.jar
Now you can start JBoss from command line, but not from Eclipse as it still misses some parameters: just open the Servers view, double click on your JBoss server and in the editor window click on the Open launch configuration link now you have select the Arguments tab and to append the -javaagent:pluggable-instrumentor.jar directive on the list.