Re: [aspectwerkz-user] RE: Advices on one point
Alexandre Vasseur <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
Only the advice declaration matters. Not having thing is the XML but in an annotation defined aspect makes it easier to understand: advice precedence is governed by source code ordering, and aspect precedence is governed by aop.xml ordering and classloader hierarchy. Alex On 4/20/05, xudong <[email protected]> wrote: > > > I defined an aop.xml which looks like: > > ... > <pointcut name="pointcut1"> > </pointcut> > > <pointcut name="pointcut2"> > </pointcut> > > <pointcut name="pointcut3"> > </pointcut> > > <advice name="advice1" type="before" bind-to="pointcut1"/> > <advice name="advice2" type="before" bind-to="pointcut2"/> > <advice name="advice3" type="before" bind-to="pointcut3"/> > ... > > If pintcut1, pointcut2, pointcut3 overlaps each other, I guess, the > execution sequence of advice1, advice2 and advice3 is determined by: > > 1) the sequence of pointcut declaration > 2) the sequence of advice declaration > > But after I changed the sequence of the two types of declaration, I found > the execution sequence were the same. > > Anyone can give me some suggestion about this problem. Thanks. > > > -----Original Message----- > From: xudong [mailto:[email protected]] > Sent: 2005420 10:28 > To: '[email protected]' > Subject: Advices on one point > > Hi all, > > If there are more than one advices for one cut point, what will happen? And > how about the execution sequence of those advices? Thanks. > > Best wishes, > xudong > >