[jboss-user] [JBoss AOP] - Proper annotation matching pointcut
do-not-reply at jboss.com
Mon Oct 27 12:23:43 EDT 2008
What's proper point-cut to intercept
- any method invocation on classes that are anotated with @FooBar
- method invocation of method annotated with @FooBar
I have this
| <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.demos.ioc.annotations.FooBar->*(..)) OR execution(* *->@org.jboss.demos.ioc.annotations.FooBar(..))">
| <interceptor-ref name="StopWatchInterceptor"/>
is it OK?
As I don't see it intercept this
| <bean name="SimpleExecutorOnMethod" class="org.jboss.demos.ioc.annotations.SimpleExecutor">
| <install method="execute">
but this could be an issue with what MC provides as pushed metadata in install element.
Note: I don't expect it to be intercepted from MC's install - as that would probably require additional reflection+aop handling.
I have an extra call to the bean's execute method from some other 'user' code.
I'll take RTFM for an answer as well ... :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184899#4184899
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184899
More information about the jboss-user