Using With JBoss 4.0.0 Final
AOP is packaged similarly to SARs(Mbeans). You can either deploy an XML file directly in the deploy/ directory with the signature -aop.xml or you can use the JAR format. The JAR format must have the file extension .aop and a jboss-aop.xml file must be contained in a META-INF directory. META-INF/jboss-aop.xml.
But, if you are forced to use the distribution here's some info:
By default, automatic AOP class-load-time transformation is not enabled. You must:
edit META-INF/jboss-service.xml as follows below
There is an MBean that deploys and manages the AOP framework.
<mbean code="org.jboss.aop.deployment.AspectManagerService" name="jboss.aop:service=AspectManager"> <attribute name="EnableTransformer">false</attribute> <!-- only relevant when EnableTransformer is true --> <attribute name="SuppressTransformationErrors">true</attribute> <!-- only relevant when Enabletransformer is true. Optimization is optional only just in case there is a bug in it --> <attribute name="Optimized">true</attribute> <attribute name="Verbose">false</attribute> </mbean> <mbean code="org.jboss.aop.deployment.AspectDeployer" name="jboss.aop:service=AspectDeployer"> </mbean>
By default, JBoss application server will not do load-time bytecode manipulation of AOP files and you will need to use the precompiler. You can turn this on by setting EnableTransformer to true. SuppressTransformationErrors will only spit out a warning if bytecode transformation fails. This flag is needed because the JSP compiler does not run within a JBoss classloader and the AOP loader cannot resolve classes from this JSP classloader.
Running with JBoss 3.2.4RC2
JBoss AOP can run within the JBoss 3.2.4RC2 and higher in the 3.2 series. It takes some work though. You have to copy the following files to the jboss-3.2.4/server/xxx/lib directory:
From the jboss-aop distribution.
From the jboss-aspects32 distribution you need to copy these libraries to the same directory
You must also modify the jboss-3.2.4/server/xxx/conf/jboss-service.xml file to add the mbean definitions you see above.
You must also copy the base-aop.xml file into the server/xxx/conf directory if you want to use any of JBoss Aspects.