[jboss-user] [Microcontainer] - Re: Evaluating IOC Containers
vickyk
do-not-reply at jboss.com
Fri Mar 2 15:04:45 EST 2007
Ales , Can you too test this
1) I have POJO
public class SimplePojo implements SimplePojoMBean
| {
| public void display(){
| System.out.println("Hello ");
| }
| }
|
2) POJO MBean Interface as
public interface SimplePojoMBean
| {
| public void display();
| }
|
3)pojo-beans.xml as
<?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="MBeanServer" class="java.lang.Object">
| <constructor factoryClass="javax.management.MBeanServerFactory" factoryMethod="createMBeanServer"/>
| </bean -->
|
| <!-- bean name="Repository" class="org.jboss.metadata.plugins.repository.basic.BasicMetaDataRepository"/>
|
| <bean name="AspectManager" class="org.jboss.aop.AspectManager">
| <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
| </bean>
|
| <!-- aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0"
| name="DependencyAdvice"
| class="org.jboss.aop.microcontainer.aspects.jmx.JMXIntroduction"
| classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
| pointcut="execution(* @org.jboss.aop.microcontainer.aspects.jmx.JMX->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
| <property name="mbeanServer"><inject bean="MBeanServer"/></property>
| </aop:lifecycle-configure -->
|
| <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>
I prepared the pojo.jar which contians SimplePojo and SimplePojoMBean .I am keeping this at Jboss-5.0.0.Beta1\server\default\lib
I have kept the pojo-beans.xml file at the Jboss-5.0.0.Beta1\server\default\deploy .
I would expect the SimplePojoMBean getting registered in Mbean server , but I am not able to look this bean at jmx-console .
What is wrong here ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024745#4024745
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024745
More information about the jboss-user
mailing list