No, you need this piece of xml code to integrate aop aspects with pojo
instantiation - order matters (add dependency if needed).
This is a small example I've done for Seam, and it works.
| <!-- Seam + MC AOP -->
|
| <bean name="SeamAspectManager" class="org.jboss.aop.AspectManager">
| <constructor factoryClass="org.jboss.aop.AspectManager"
factoryMethod="instance"/>
| </bean>
|
| <beanfactory name="SeamAdvice"
class="org.jboss.seam.ioc.microcontainer.SeamIntroduction"/>
|
| <bean name="SeamAspect"
class="org.jboss.aop.microcontainer.beans.Aspect">
| <property name="advice"><inject bean="SeamAdvice"/></property>
| <property name="manager"><inject bean="SeamAspectManager"/></property>
| </bean>
|
| <bean name="SeamIntroduction"
class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
| <property name="classes">@org.jboss.seam.annotations.Name</property>
| <property name="interfaces">
| <list elementClass="java.lang.String">
|
<value>org.jboss.kernel.spi.dependency.KernelControllerContextAware</value>
| </list>
| </property>
| <property name="manager"><inject bean="SeamAspectManager"/></property>
| </bean>
|
| <bean name="SeamBinding"
class="org.jboss.aop.microcontainer.beans.AspectBinding">
| <property name="pointcut">execution(*
$instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))</property>
| <property name="aspect"><inject bean="SeamAspect"
property="definition"/></property>
| <property name="manager"><inject bean="SeamAspectManager"/></property>
| </bean>
| /code]
|
| It intercepts all MC beans that have Seam's @Name annotation.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024918#4024918
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024918
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user