"alesj" wrote : "vickyk" wrote :
| | All we need to do is to have the above code formed through the xml file when using
the MC . Am I right ?
| |
| Yes, see how this is done in JMXDecoratedTestCase.(java|xml).
| And this can be simplified now - less aop xml code.
After looking into the JMXDecoratedTestCase I have found this <beanfactory
name="MetaDataContextAdvice"
class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
| <property
name="annotation">org.jboss.aop.microcontainer.aspects.jmx.JMX</property>
| </beanfactory>
|
What does this precisely do ?
I have prepared a POJO , I have prepared a jar of that and dropped in the
server/default/lib as pojo.jar . The pojo.jar contains the required POJO .
The step where I am getting stuck is how to configure the pojo-beans.xml for the POJO
I am not able to understand what to have instead of this
<beanfactory name="MetaDataContextAdvice"
class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
| <property
name="annotation">org.jboss.aop.microcontainer.aspects.jmx.JMX</property>
| </beanfactory>
|
Here goes my pojo-beans.xml contents <?xml version="1.0"
encoding="UTF-8"?>
|
| <!-- deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="urn:jboss:bean-deployer
bean-deployer_2_0.xsd"
| xmlns="urn:jboss:bean-deployer:2.0" -->
| <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 -->
|
| <beanfactory name="MetaDataContextAdvice"
class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor/???????">
| <property
name="annotation">org.jboss.aop.microcontainer.aspects.jmx.JMX</property>
| </beanfactory>
|
| <bean name="MetaDataContextAspect"
class="org.jboss.aop.microcontainer.beans.Aspect">
| <property name="advice"><inject
bean="MetaDataContextAdvice"/></property>
| <property name="manager"><inject
bean="AspectManager"/></property>
| </bean>
|
| <bean name="MetaDataContextBinding"
class="org.jboss.aop.microcontainer.beans.AspectBinding">
| <property name="pointcut">execution(*
org.jboss.test.microcontainer.support.SimpleBeanImpl->*(..))</property>
| <property name="aspect"><inject
bean="MetaDataContextAspect"
property="definition"/></property>
| <property name="manager"><inject
bean="AspectManager"/></property>
| </bean>
|
| <bean name="SimplePojo" class="org.jboss.mc.SimplePojo">
|
| <!-- FIXME restore the property replacement on the partition name once
JBMICROCONT-143 is fixed -->
|
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=POJO",
exposedInterface=org.jboss.mc.SimplePojoMBean.class,
registerDirectly=true)</annotation>
| </bean>
|
| </deployment>
What should be the entry for the beanfactory's classname in the pojo-beans.xml which
I have pasted above? Looks like I need to write some class specific to POJO here or I can
use some standard one from the Jboss itself ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023945#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...