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

Kabir Khan do-not-reply at jboss.com
Mon Feb 1 09:57:47 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/523388#523388

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
> baronDodd wrote:
>  
> 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.
For compile-time weaving you don't need to turn on EnableLoadtimeWeaving, but you still need to deploy a jboss-aop.xml file (either standalone OR in an .aop archive in META-INF/jboss-aop.xml.
> baronDodd wrote:
>  
> 1) If I am using annotations e.g @InterceptorDef  do I still need an *-aop.xml file at all?
To use annotations the classes need to be in a .aop archive, and in AS 4 for this to be recognized you need the META-INF/jboss-aop.xml file, but you don't need anything apart from <aop></aop>
> baronDodd wrote:
>  
> 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?
>  
Yes

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

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




More information about the jboss-user mailing list