ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Introduction to Aspect-Oriented Programming
Subject:   help needed regarding weaving
Date:   2006-09-11 03:58:37
From:   piyush_batra

I want to weave my advice before and after public methods of public class. I tried using execution AND within pointcut() together to limit the scope...

The XML used is

<system id="AspectWerkzExample1">
<aspect class="expressionTesting.ExpressionAspect">
<pointcut name="greetMethod" expression="within(public expressionTesting.*) AND execution(public * *(..)) "/>
<advice name="beforeGreeting" type="before" bind-to="greetMethod"/>
<advice name="afterGreeting" type="after" bind-to="greetMethod"/>



expressionTesting is the name of the package

but this doesn't work out ...

seems there is some problem with the expression ....help me to get the correct expression

reply asap...

1 to 1 of 1
1 to 1 of 1