1) Make sure that you have JBoss set up correctly for loadtime weaving as described in
section 10.3 of the JBoss AOP 1.5.x reference manual.
2) Run the "injboss" tutorial example that comes with the JBoss AOP download.
This explains how to package your applications for loadtime weaving
A lot of people have asked this question so either use search, or read this:
"flavia.rainone(a)jboss.com" wrote : So, the example injboss is not working
in your configuration of JBoss AS server?
|
| Let's check the following steps:
|
| - let's start with a clean server to help us tracking what is missing here (fresh
installed, and you haven't edited any file of it, nor have you deployed anything)
| - in this JBoss AS, remove the jboss-aop-jdk50.deployer directory of
server/all/deploy
| - download the latest stable version of JBoss AOP (1.5.5 GA)
| - in the directory docs/aspect-framework/examples/injboss of your JBoss AOP
installation, edit build.xml file, in order to set your jboss.home directory as follows:
|
| | <property name="jboss.dir" value="your jboss home directory
here"/>
| |
| - run one of the loadtime deployment tasks of the injboss example, like the
following:
|
| | $ ant deploy-basic-lt-war-in-jar
| |
| - copy the appropriate jboss-aop-jdk50.deployer directory from your JBoss AOP
installation to your server/all/deploy directory.
| - edit jboss-aop-jdk50.deployer/jboss-service.xml, setting EnableLoadTimeWeaving with
a true value, like follows:
|
| | <attribute
name="EnableLoadtimeWeaving">true</attribute>
| |
| - follow the instructions of the jboss-aop-jdk50.deployer/ReadMe.txt file
| - copy pluggable-instrumentor.jar file (located in the lib-50 directory of your JBoss
AOP installation) to the bin directory of your server
| - edit your run.sh or run.bat to include -javaagent:pluggable-instrumentor.jar in the
JAVA_OPTS
| - start up your server on the "all" mode
| - now, access the address
http://localhost:8080/aopexample/index.jsp and you should
see the interceptor messages on your console.
|
| This should work. Once you have this up and running, just replace the injboss jar by
your application file in the deploy dir.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054277#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...