[jboss-user] [JBoss AOP] - Negation Pointcut Example

kumaran d do-not-reply at jboss.com
Fri May 13 07:29:50 EDT 2011


kumaran d [http://community.jboss.org/people/dkumaran] created the discussion

"Negation Pointcut Example"

To view the discussion, visit: http://community.jboss.org/message/605138#605138

--------------------------------------------------------------
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
[http://community.jboss.org/message/605138#605138]

Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110513/fe61ced1/attachment.html 


More information about the jboss-user mailing list