|Re: [aspectj-users] "can't determine precedence"|
Your code is incomplete since it only shows one advice from one concrete
aspect; you must have another concrete aspect extending Tracing if in fact
commenting out the advice in the absract aspect Tracing makes a difference
(or there's a bug in ajc).
Precedence determination fails only when the precedence rules result in cycles
when applied to the advice at a join point (I thought the message used to state
as such?), so check out the programming guide section on point as cited by George.
A simple way to avoid most cycles is to put all "after" advice in an aspect after
"around" and "before" advice. Just be sure that's the precedence you want.
I should add that there's a debate about relying on advice precedence for
correctness. In some cases, it's clearly required, but in others consolidating
two pieces of advice into one make the dependencies more clear. Declaring
precedence as between aspects can provide some indication, but typically
the developer should enter comments if order really matters, to avoid
accidental functional changes caused by re-ordering advice or aspect hierarchy.
Hope this helps-