The problem is in the pointcut expression. Execution pointcuts match only the body of the
method, which is not present in HelloAOPInterface, given it is an interface. And, since
you used the name "com.HelloAOPInterface" as the class that you intent to
intercept, JBoss AOP restricts itself only to HelloAOPInterface, ignoring implementing
classes.
To solve the issue, you should use $instanceof in your pointcut expression:
| execution(public void $instanceof(com.HelloAOPInterface)->callMe())
|
This way, JBoss AOP will match all bodies of methods called "public void
callMe()" contained in classes that implement HelloAOPInterface.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138528#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...