Re: [aspectwerkz-user] RE: Advices on one point
Alexandru Popescu <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Advice precendence has been discussed some time ago both on this ML and AJ lists. The AW advice precedence is imo a little bit clearer than the one of AJ. So the rules are quite simple: 1/ classpath order for aop.xml (when there are several / or in a classloader hierarchy etc) 2/ order of aspects in the aop.xml 3/ order of advice in one aspect as it is in source code - --:alex |.::the_mindstorm::.| ps: for AJ precedence rules you should consult they user guide where the rules are explained and Ramnivas' excellent book. [quote xudong::on 4/20/2005 8:36 PM] > > 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: 2005骞420 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 > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCZjjlOCPjdDT2FEURAit7AKCxH/EuPd090QnqiGMmmMktt999HgCggFbO 9fe/DFeL65lkTS/hQAMq7vA= =9Vq9 -----END PGP SIGNATURE-----