[jboss-user] [JBoss AOP] - Re: How to avoid intercepting recursive calls

kabir.khan@jboss.com do-not-reply at jboss.com
Fri Jun 8 10:04:34 EDT 2007


anonymous wrote : 
  | <cflow-stack> is not the one I am looking for. 
  | 
The purpose of cflow is exactly what you mention in the original problem - you need something along the lines of:


  | <aop>
  |    <cflow-stack name="NotRecursivePOJO">
  |       <not-called expr="* POJO->*(..)"/>
  |    </cflow-stack>
  | 
  |    <bind pointcut="execution(public * POJO->*(..))" cflow="NotRecursivePOJO">
  |       <interceptor class="Blah"/>
  |    </bind>
  | </aop>
  | 

I cannot remember if wildcards are allowed in cflow-stack/not-called, if not you will need to explicitly list all methods in not-called elements:

  |    <cflow-stack name="NotRecursivePOJO">
  |       <not-called expr="void POJO->authenticate(..)"/>
  |       <not-called expr="void POJO->prepare(..)"/>
  |       <not-called expr="void POJO->post(..)"/>
  |    </cflow-stack>
  | 

Please let me know which of these two approaches work, and I can try to update the docs

"within" is only usable with "call()" pointcuts

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

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



More information about the jboss-user mailing list