Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] around advice & exceptions

To "close over" the
proceed means to invoke proceed in a class constructed in the method. The object can then be passed to a delegate method, implicitly along with all the join point context. This can even be invoked later, after the join point returns.

Wow. Continuations caputured as Java objects... And people think AspectJ is good for tracing ;-)

Since you can use this to permit delegates to do anything that
around does, there's no limit to what you can do with this.  I
used it in the AOSD "Good AOP" presentation to implement fully
dynamic advice that changes at runtime using pluggable delegates.
Ramnivas popularized another use of this technique in an "AspectJ
in Action" section on the worker pattern.

This is really interesting. I've read "AspectJ in Action" a few months ago. I need to take a look at that chapter again.

> However, since proceed(..)
invokes all less-precedent advice and the join point itself,
misuse can lead to extremely weird behavior and memory leaks.

"Extreme power brings on extreme responsibility..." ;-)

Thanks a lot for the explainations!

Rafal


Back to the top