JBoss.org Community Documentation

5.2. Configuring the microcontainer

Before we can apply the audit aspect to our service we must first add a number of JARs to the extension classpath. These can be found in the lib subdirectory of the client-aop distribution located in the examples/User_Guide/gettingStarted/commandLineClient/target/client-aop.dir directory:


First of all we need to include the auditAspect jar as we need to create an instance of our aspect at runtime in order to execute the logic. We then need to include the jar file for JBoss AOP (jboss-aop) together with its dependencies; javassist and trove. Finally we need to add the jboss-aop-mc-int jar as this contains an XML schema definition that allows us to define aspects inside our XML deployment descriptor. It also contains integration code to create dependencies between normal beans and aspect beans within the microcontainer so that we can add behaviour during the deployment and undeployment phases.


Since we are using Maven2 to assemble the client-aop distribution we can easily add these JAR files by declaring the appropriate dependencies in our pom.xml file and creating a valid assembly descriptor. If you are using Ant to perform your build then you will need to do this in a different way.