| RE: [aspectj-dev] Advice Precedence Question |
FYI, when I tested this it does appear that the AspectJ implementation at least has dressing/undressing consistency so advice from two unrelated aspects A and B will run in a random but consistent precedence order relative to each other. I haven't looked at the implementation to see if that's guaranteed, but it happens for a number of test cases _____ From: aspectj-dev-bounces@xxxxxxxxxxx [mailto:aspectj-dev-bounces@xxxxxxxxxxx] On Behalf Of Ron DiFrango Sent: Monday, March 05, 2007 1:04 PM To: AspectJ developer discussions Subject: 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
<<attachment: winmail.dat>>