Hi,

You can give the interceptors a name and they will be "pooled" by their name. 
If you do not give them a name, the name of the class will be used as the name 
internally, so they will effectively be pooled by class name.

So, the following should work

  | <aop>
  |    <interceptor name="startInt" class="org.jbpmaop.LogInterceptor" 
scope="PER_INSTANCE">
  |       <attribute name="method">start</attribute>
  |     </interceptor>
  |    <interceptor name="signalInt" class="org.jbpmaop.LogInterceptor" 
scope="PER_INSTANCE">
  |       <attribute name="method">signal</attribute>
  |     </interceptor>
  |     <bind pointcut="execution(public void org.jbpmaop.Token->start())">
  |         <interceptor-ref name="startInt"/>
  |     </bind>
  |     <bind pointcut="execution(public void org.jbpmaop.Token->signal())">
  |         <interceptor-ref name="signalInt"/>
  |     </bind>
  | </aop>      
  | 
Or the equivalent:

  | <aop>
  |     <bind pointcut="execution(public void org.jbpmaop.Token->start())">
  |       <interceptor name="startInt" class="org.jbpmaop.LogInterceptor" 
scope="PER_INSTANCE">
  |          <attribute name="method">start</attribute>
  |        </interceptor>
  |     </bind>
  |     <bind pointcut="execution(public void org.jbpmaop.Token->signal())">
  |       <interceptor name="signalInt" class="org.jbpmaop.LogInterceptor" 
scope="PER_INSTANCE">
  |          <attribute name="method">signal</attribute>
  |        </interceptor>
  |     </bind>
  | </aop>      
  | 


I prefer the first option, since it kind of splits the definition and usage of 
the interceptors. 

Cheers,

Kabir

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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to