aspose file tools*
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
JavaRanch » Java Forums » Frameworks » Aspect Oriented Programming
Bookmark "After Advice not working" Watch "After Advice not working" New topic
Author

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.

Regards,
Shroff.


OCJP-90%,OCPWCD-95%
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.

Regards,
Shroff.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

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