Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Order in which aspects get applied

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.



Back to the top