此内容没有您所选择的语言版本。
8.7. JRockit
JRockit also supports the
-javaagent switch mentioned in Section 8.6, “Loadtime transformation in the JBoss Enterprise Application Platform Using Sun JDK”. If you wish to use that, then the steps in Section 8.6, “Loadtime transformation in the JBoss Enterprise Application Platform Using Sun JDK” are sufficient. However, JRockit also comes with its own framework for intercepting when classes are loaded, which might be faster than the -javaagent switch. If you want to do load-time transformations using the special JRockit hooks, these are the steps you must take.
- Set the
enableLoadtimeWeavingattribute/property to true. 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 the classes referenced. - Copy the
jrockit-pluggable-instrumentor.jarfrom thelib/directory of your JBoss AOP distribution to thebin/directory of your the JBoss Enterprise Application Platform installation. - Next edit
run.shorrun.bat(depending on what OS you're on) and add the following to theJAVA_OPTSandJBOSS_CLASSPATHenvironment variables:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the class of the
AspectManagerService toorg.jboss.aop.deployers.AspectManagerJRockiton JBoss Enterprise Application Platform 5, ororg.jboss.aop.deployment.AspectManagerServiceas these are what work with special hooks in JRockit.