Re: [aspectwerkz-user] Multiple aspects using the same advice function
Alexandru Popescu <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [quote Kreinick, Michael H.::on 4/8/2005 5:54 PM] > There seems to be a problem using more than one pointcut on one advice. Only > one of the pointcuts is actually used. We tried this form: > > <aspect class="HelloWorldHijacker"> > <pointcut name="greetMethod" expression="execution(* > testAOP.HelloWorld2.greet(..))"/> > <pointcut name="fooMethod" expression="execution(* > testAOP.HelloWorld2.foo(..))"/> > > <advice name="functionName" type="around" bind-to="greetMethod"/> > <advice name="functionName" type="around" bind-to="fooMethod"/> > </aspect> > > And this form: > > <aspect class="HelloWorldHijacker"> > <pointcut name="greetMethod" expression="execution(* > testAOP.HelloWorld2.greet(..))"/> > <pointcut name="fooMethod" expression="execution(* > testAOP.HelloWorld2.foo(..))"/> > <advice name="functionName" type="around"> > <bind-to pointcut="greetMethod"/> > <bind-to pointcut="fooMethod"/> > </advice> > </aspect> > > But in both cases the advice was applied only to greet. Given that the > second is in the DTD I would have expected it to work. Is this a bug? > -Michael > Why aren't you using greetMethod OR fooMethod instead of trying to bind it twice? - -- :alex |.::the_mindstorm::.| -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) iD8DBQFCVrslOCPjdDT2FEURApC3AJ49draBKqdCIZdgnIy0L+CurXTnNACfSQx7 0+2TQHgwgkkwgrjgPEeLxRk= =iLbe -----END PGP SIGNATURE-----