I added a test of intercepting a bean which implements an interface, but I can't get
the exact behavior I'm looking for. I want to only intercept the iPOJO interface
methods on beans implementing iPOJO. To get interception I had to specify all methods on
beans implementation iPOJO. The commented out interceptor element fails:
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <bean name="AspectManager"
class="org.jboss.aop.AspectManager">
| <constructor factoryClass="org.jboss.aop.AspectManager"
factoryMethod="instance"/>
| </bean>
|
| <interceptor xmlns="urn:jboss:aop-beans:1.0"
class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
| <!-- This works -->
| <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(*
$instanceof{org.jboss.test.microcontainer.beans.iPOJO}->*(..))">
| <interceptor-ref
name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
| </bind>
| <!-- This does not work?
| <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(*
$instanceof{org.jboss.test.microcontainer.beans.iPOJO}->$implements(org.jboss.test.microcontainer.beans.iPOJO))">
| <interceptor-ref
name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
| </bind>
| -->
|
| <bean name="Bean"
class="org.jboss.test.microcontainer.beans.POJO"/>
|
| </deployment>
|
I'm following the syntax from the ref guide:
http://www.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/referen...
What's wrong with that expression or this usage?
The test is in the jboss-aop-mc-int project as
org.jboss.test.microcontainer.beans.test.InterceptorSimpleIfaceDeploymentTestCase
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192337#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...