[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[aspectj-dev] Advice Precedence Question
|
- From: "Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx>
- Date: Mon, 5 Mar 2007 12:33:28 -0800
- Delivered-to: aspectj-dev@eclipse.org
- Organization: New Aspects of Software
- Thread-index: AcdfZYe1sGkT9dEwTAeZvCKCiyLtng==
I know in principle if aspect A and aspect B don't have precedence defined
for them that advice defined in A and B that match at a given join point
will run in an undefined order. However, I'm wondering if in practice
there's any way that advice at a join point across the aspects could run in
different precedence order. Specifically if both A and B have before and
after returning advice that match the same join point, will AspectJ ever
produce results that run like this?
before from A
before from B
join point executes
after returning from A
after returning from B
This is a problem for us because we have a large number of aspects that
might run independently at a given join point and we don't care about
ordering except we do maintain a thread local stack so we do want consistent
dressing/undressing. Given the number of independent monitor aspects
(already about 20 and growing and user extensible even with XML definition),
I don't see a reasonable way to force a total ordering with declare
precedence. Indeed, I'd argue that consistent precedence ordering is
desirable even if which aspect will be higher precedence isn't defined.