As part of
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=94575
I extended the AspectBeanMetaDataFactory so that instead of
| <bean name="JMXIntroduction"
class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
| <property
name="classes">(a)org.jboss.aop.microcontainer.aspects.jmx.JMX</property>
| <property name="interfaces">
| <list elementClass="java.lang.String">
|
<value>org.jboss.kernel.spi.dependency.KernelControllerContextAware</value>
| </list>
| </property>
| <property name="manager"><inject
bean="AspectManager" property="aspectManager"/></property>
| </bean>
| <beanfactory name="JMXAdvice"
class="org.jboss.aop.microcontainer.aspects.jmx.JMXIntroduction">
| <property name="mbeanServer"><inject
bean="JMXKernel" property="mbeanServer"/></property>
| </beanfactory>
|
| <bean name="JMXAspect"
class="org.jboss.aop.microcontainer.beans.Aspect">
| <property name="advice"><inject
bean="JMXAdvice"/></property>
| <property name="manager"><inject
bean="AspectManager" property="aspectManager"/></property>
| </bean>
|
| <bean name="JMXBinding"
class="org.jboss.aop.microcontainer.beans.AspectBinding">
| <property name="pointcut">execution(*
@org.jboss.aop.microcontainer.aspects.jmx.JMX->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))</property>
| <property name="aspect"><inject bean="JMXAspect"
property="definition"/></property>
| <property name="manager"><inject
bean="AspectManager" property="aspectManager"/></property>
| </bean>
|
we can use
| <aop:lifecycle xmlns:aop="urn:jboss:aop-beans:1.0"
| name="JMXAdvice"
|
class="org.jboss.aop.microcontainer.aspects.jmx.JMXIntroduction"
| classes="(a)org.jboss.aop.microcontainer.aspects.jmx.JMX"
| manager-bean="AspectManager"
| manager-property="aspectManager"
| pointcut="execution(*
@org.jboss.aop.microcontainer.aspects.jmx.JMX->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
| <property name="mbeanServer"><inject
bean="JMXKernel" property="mbeanServer"/></property>
| </aop:lifecycle>
|
It is definitely easier and less verbose, but I did this before I saw Adrian's reply,
which I have yet to digest :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985149#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...