JBoss Community

Negation Pointcut Example

created by kumaran d in JBoss AOP - View the full discussion

Hi

 

In Jboss AOP how we can exclude some packages not to be intercepted. Is negation( '!' Not Operator ) correct way of doing it ??.

If so please advise me how to use it..

 

The pointcut expression which i tried gives PointcutExpressionExcpetion.

 

In the below package structure i want to intercept all the classes except com.mycom.common.util package classes.

 

     com.mycom.common

     com.mycom.common.util

     com.mycom.common.dao

     com.mycom.common.entity

     com.mycom.common.service

 

           <bind pointcut="execution(* com.mycom.common.*->*(..)) AND execution(* !com.mycom.common.util.*->*(..)) ">

                  <interceptor-ref name="com.mycom.aop.MyInterceptor"/>

          </bind>

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community