JBoss.org Community Documentation
In JBoss 4.x the AspectManager Service is configured using a JBoss Microcontainer bean. The configuration file
is jboss-4.x.x.GA/server/default/deploy/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml
.
The AspectManager Service is deployed with
the following xml:
<mbean code="org.jboss.aop.deployment.AspectManagerServiceJDK5" name="jboss.aop:service=AspectManager"> <attribute name="EnableLoadtimeWeaving">false</attribute> <!-- only relevant when EnableLoadtimeWeaving is true. When transformer is on, every loaded class gets transformed. If AOP can't find the class, then it throws an exception. Sometimes, classes may not have all the classes they reference. So, the Suppressing is needed. (i.e. Jboss cache in the default configuration --> <attribute name="SuppressTransformationErrors">true</attribute> <attribute name="Prune">true</attribute> <attribute name="Include">org.jboss.test, org.jboss.injbossaop</attribute> <attribute name="Exclude">org.jboss.</attribute> <!-- This avoids instrumentation of hibernate cglib enhanced proxies <attribute name="Ignore">*$$EnhancerByCGLIB$$*</attribute> --> <attribute name="Optimized">true</attribute> <attribute name="Verbose">false</attribute> <depends optional-attribute-name="JBossIntegrationWrapper" proxy-type="attribute">jboss.aop:service=JBoss4IntegrationWrapper</depends> <!-- Available choices for this attribute are: org.jboss.aop.instrument.ClassicInstrumentor (default) org.jboss.aop.instrument.GeneratedAdvisorInstrumentor <attribute name="Instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</attribute> --> </mbean>
In later sections we will talk about changing the class of the AspectManager Service, to
do this replace the contents of the code
attribute of the
mbean
element.