This content has been marked as final.
Show 3 replies
-
1. Re: how to exclude a caller in interceptor
waynebaylor Aug 30, 2007 11:11 PM (in response to john_woo)you could try something like:
<typedef name="intercept_this" expr="class(my.package.*)"/> <typedef name="dont_intercept" expr="class($instanceof{@MessageDriven})"/> <pointcut name="myPointcut" expr="execution(public * $typedef{intercept_this}->*(..)) AND !execution(publiic * $typedef{dont_intercept}->*(..))"/> <bind pointcut="myPointcut"> <interceptor class="the.interceptor.MyInterceptor"/> </bind>
notice the use of AND along with the !(not). -
2. Re: how to exclude a caller in interceptor
john_woo Aug 31, 2007 7:42 AM (in response to john_woo)"waynebaylor" wrote:
you could try something like:<typedef name="intercept_this" expr="class(my.package.*)"/> <typedef name="dont_intercept" expr="class($instanceof{@MessageDriven})"/> <pointcut name="myPointcut" expr="execution(public * $typedef{intercept_this}->*(..)) AND !execution(publiic * $typedef{dont_intercept}->*(..))"/> <bind pointcut="myPointcut"> <interceptor class="the.interceptor.MyInterceptor"/> </bind>
notice the use of AND along with the !(not).
Thanks lots.
Can you tell where I can find more examples and the explanation for the descriptor?
John
Toronto -
3. Re: how to exclude a caller in interceptor
waynebaylor Aug 31, 2007 12:05 PM (in response to john_woo)here's a link for docs:
http://docs.jboss.org/aop/1.3/aspect-framework/
here's a link for the xml descriptor (it's under "Reference Guide" in the above link):
http://docs.jboss.org/aop/1.3/aspect-framework/reference/en/html_single/index.html#xml