Env: JDK1.6, Spring 2.5.1
I am using MetadataMBeanInfoAssembler and I find that the beans
are not exposed when I query via MC4J (1.2 beta 9):
Here is a sample POJO that I a attempt to export:Code:<bean id="MyMBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean" p:defaultDomain="${my.domain}" /> <context:mbean-export server="MyMBeanServer" default-domain="${my.domain}"/> <bean id="MyMBeanAttributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" /> <bean id="MyMBeanAssembler" class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler" p:attributeSource-ref="MyMBeanAttributeSource" /> <bean id="MyMBeanNamingStrategy" class="org.springframework.jmx.export.naming.MetadataNamingStrategy" p:attributeSource-ref="MyMBeanAttributeSource" /> <bean id="MyMBeanExporter" class="org.springframework.jmx.export.MBeanExporter" p:assembler-ref="MyMBeanAssembler" p:autodetectModeName="AUTODETECT_ASSEMBLER" p:namingStrategy-ref="MyMBeanNamingStrategy" p:registrationBehaviorName="REGISTRATION_FAIL_ON_EXISTING" p:server-ref="MyMBeanServer" />
I am running this code in tomcat 6.0.x. When I connect to the serviceCode:package com.xxx.foo; @ManagedResource(objectName="MyDomain:name=MyStatus", description="My status") public class MyStatus implements Serializable { ... }
URL, I see Tomcat-exported MBeans but I do not see
MBean "MyDomain:name=MyStatus".
Is there anything I am missing above that makes MetadataMBeanInfoAssembler not do its function?
Any help greatly appreciated!
Thanx,
/U


Reply With Quote