[jboss-user] [EJB/JBoss] - Re: how to exclude a caller in interceptor

waynebaylor do-not-reply at jboss.com
Thu Aug 30 23:11:48 EDT 2007


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).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079821#4079821

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079821



More information about the jboss-user mailing list