[jboss-user] [JBoss AOP] New message: "Re: Tried everything to get Interceptor working, what am I missing?"

Nick Dodd do-not-reply at jboss.com
Mon Feb 1 09:15:42 EST 2010


User development,

A new message was posted in the thread "Tried everything to get Interceptor working, what am I missing?":

http://community.jboss.org/message/523365#523365

Author  : Nick Dodd
Profile : http://community.jboss.org/people/baronDodd

Message:
--------------------------------------------------------------
I have looked at the injboss example. It uses annotations which I had already given up on  after several hours without any luck.
 
The link to the documentation is for loadtime instrumentation while I am attempting pre-compiled intstumentation. Anyhow the XML in the sample is identical to what I already had, it is the same as what is shipping with JBoss. But am I required to turn on EnableLoadtimeWeaving and edit the include / exclude elements? I tried this and I got several NullPointers and stack traces.
 
In chapter 8 it says to:
 
1. Delete jboss-aop.deployer file or directory from the existing JBoss Application Server distribution under server/<config-name>/deploy
2. From the JBoss AOP distribution, from the jboss-40-install directory copy jboss-aop.deployer/ or jboss-aop-jdk50.deployer to the JBoss Application Server distribution under server/<config-name>/deploy depending on which JDK you are running with.
 
I have tried this and again no difference. I had to download the same version of aop shipped with jboss 4.3.0 anyhow as otherwise there are many classes missing.
 
The documentation is very confusing, there are 3 ways of implementing aspects (POJO with xml, annotations or a mixture), there are 3 ways of implementing instrumentation (pre-compile, loadtime, dynamic) and different instructions on how to build/install/deploy/command line options for aop depending on which combinations of the above you used and whether you are running jboss 4/5. Arrrrrggghh!
 
1) If I am using annotations e.g @InterceptorDef  do I still need an *-aop.xml file at all?
2) When I use the aopc ant task, obviously the aspect/interceptor classes need to be on the classpath, but do the target classes which I am intercepting also need to be on the classpath? 

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/523365#523365




More information about the jboss-user mailing list