Package Classes to Run with AOP
To run these examples you must edit build.xml and set the jboss.dir to where JBoss is. The server configuration used in this example is 'all', so you must start JBoss with 'run -c all'. You can change the server configuration used by modifying the jboss.server.config property in build.xml. This example assumes you are running against JBoss 4.2.x.. If you want to run against other jboss versions, you might have to edit the jboss.classpath settings. If you want to run against JBoss 5.x, we have provided an alternative ant script, to run this instead of merely running ant deployXXX, you need to run ant -f build-jboss5.xml deployXXX There are several ways to package classes to be run with AOP in JBoss, and this page takes you through a few of the options available to you. All the examples shown here use loadtime transformations, so you will need to modify your jboss/server/--yourconfig--/conf/jboss-service.xml as outlined in Running with JBoss Application Server A simple application is that comes in a web-application and a full J2EE app flavour is used to illustrate how it can be pacaged in different ways to acheive the same thing. The source class/package structure is org | - jboss | - injbossaop | - ejb (Only used in EAR version) | | | - ExampleSession | - ExampleSessionBean | - ExampleSessionHome | -lib | | | - ExampleValue | - SimpleInterceptor | |-mbean | - Standard - StandardMBean | | |-web | - BasicExampleServlet (Used for WAR version) - EarExampleServlet (USed for EAR version) Both examples use the same jboss-aop.xml file