Show Table of Contents
12.6. Loadtime transformation in the JBoss Enterprise Application Platform Using Sun JDK
The JBoss Enterprise Application Platform has special integration with JDK to do loadtime transformations. This section explains how to use it.
If you want to do load-time transformations with JBoss Enterprise Application Platform 5 and Sun JDK, these are the steps you must take.
- Set the
enableLoadtimeWeavingattribute/property totrue. By default, JBoss Enterprise Application Platform will not do load-time bytecode manipulation of AOP files unless this is set. IfsuppressTransformationErrorsistrue, failed bytecode transformation will only give an error warning. This flag is needed because sometimes a JBoss deployment will not include all of the classes referenced. - Copy the
pluggable-instrumentor.jarfrom thelib/directory of your JBoss AOP distribution to thebin/directory of your JBoss Enterprise Application Platform. - Next edit
run.shorrun.bat(depending on what OS you are on) and add the following to theJAVA_OPTSenvironment variable:set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -javaagent:pluggable-instrumentor.jar
Important
The class of the AspectManager Service must be
org.jboss.aop.deployers.AspectManagerJDK5 or org.jboss.aop.deployment.AspectManagerServiceJDK5 as these are what work with the -javaagent option.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.