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,

The behaviour you see is guaranteed by the specification and is nicely described on Page 257 of "eclipse AspectJ".

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)



"Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx>
Sent by: aspectj-dev-bounces@xxxxxxxxxxx

11/03/2007 06:39

Please respond to
AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>

To
"'AspectJ developer discussions'" <aspectj-dev@xxxxxxxxxxx>
cc
Subject
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

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







Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






Attachment: winmail.dat
Description: Binary data


Back to the top