wood burning stoves 2.0*
The moose likes Aspect Oriented Programming and the fly likes After Advice not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Aspect Oriented Programming
Bookmark "After Advice not working" Watch "After Advice not working" New topic

After Advice not working

Sagar Shroff
Ranch Hand

Joined: Jun 07, 2011
Posts: 208

Hi ranchers ,
I am trying a small example of After advice. I am having following class

I have following spring configuration :

And when i invoke hello() , the after advice method i.e bye() does not get invoked. Can someone please help me where exactly have i made mistake as this is very basic and as i have just started with spring.


Sagar Shroff
Ranch Hand

Joined: Jun 07, 2011
Posts: 208

Will be really helpful to me if someone can help me understand why my advice method is not getting called.

Bill Gorder

Joined: Mar 07, 2010
Posts: 1648

If you are going to use Spring interface based proxying for your AOP then you need to code to interfaces, and invoke the aspect through the interface for the proxy to be there and your advice to be executed.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link: http://aspose.com/file-tools
subject: After Advice not working
Similar Threads
aop and transations
Problem with Spring AOP+AspectJ
unable to Apply Aspects to simpleformcontroller class methods
Hello world spring aop
java.lang.IllegalArgumentException: The input() is not defined in action class $Proxy262