[aspectwerkz-user] Multiple aspects using the same advice function

"Kreinick, Michael H." <[email protected]>
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <F48A26BC9CC4D44685BC2C2DD669958911CA7D@gsnmp03es.firmwide.corp.gs.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.