Spring AOP Proxy Self Access

 While reading "AspectJ In Action, 2nd Ed", I ran across the following method of accessing an advised aop proxy from within the proxied class while still activating the aspect functionality:

 

AopContext.currentProxy()

 

 

That's it. Barely worth a post, I know, but may come as great help if you ever used Spring's AOP Wrapping (transactions, caching, ...) and needed to make a self-bound call that should go through the AOP interceptors.

Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com