[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Order in which aspects get applied
|
"declare precedence" is the way to control the ordering
of advice between multiple aspects. Please see documentation
for more information.
-Ramnivas
--- Arun Natarajan <anatara1@xxxxxxx> wrote:
> Hello all,
> Suppose I have 2 aspects each with some before() advice
> implementation. If
> my java program has a join point which matches the pointcut
> definitions in
> both aspects, then what would be the order in which the two before()
> advices
> get executed?
> Is there a way to tell this to the ajc compiler or is this order
> something I
> should not rely on?
>
> I tried a simple logging example with three files,
> MessageCommunicator.java,
> MannersAspect.java and MannerAspect1.java. Irrespective of the order
> in
> which I compiled them, MannersAspect1.java's advice was executed
> before
> MannersAspect.java's advice.
>
> It would be great if someone could clarify this for me.
>
> Thanks,
> Arun N.
=====
Ramnivas Laddad,
Author, AspectJ in Action
http://www.manning.com/laddad
http://www.amazon.com/exec/obidos/ASIN/1930110936
Check out my aspect-oriented refactoring articles:
http://tinyurl.com/yqm96
http://tinyurl.com/288nn
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus