Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] Advice Precedence Question

Ron,
 
I had a similar problem long ago as a switch between versions caused my advice to change ordering.  If I remember the discussion back then the "algorithm" for advice ordering was determined by alphabetic ordering.
 
Ron DiFrango
Senior Consultant
Cap Tech Ventures, Inc
Cell: 804-855-9196
Work: 804-545-8742

________________________________

From: aspectj-dev-bounces@xxxxxxxxxxx on behalf of Ron Bodkin
Sent: Mon 3/5/2007 3:33 PM
To: 'AspectJ developer discussions'
Subject: [aspectj-dev] Advice Precedence Question



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.


_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


<<winmail.dat>>


Back to the top