Using spring 2.5.6.SEC01 with JDK 1.6.0_20. We use Spring to expose some beans using @ManagedResource. The configuration looks as follows:
Everything works as expected and we can see our custom MBeans using MC4J. Is it possible to connect to the same mbean server and also see the platform MBeans (e.g., MemoryPoolMXBean)? MBeanProxyFactoryBean perhaps? Any pointers are appreciated.Code:<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/> <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"> <property name="port" value="${rmi.registry.port}"/> </bean> <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"> <property name="assembler"> <bean class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler"> <property name="attributeSource" ref="jmxAttributeSource"/> </bean> </property> <property name="namingStrategy"> <bean class="org.springframework.jmx.export.naming.MetadataNamingStrategy"> <property name="attributeSource" ref="jmxAttributeSource"/> </bean> </property> <property name="autodetect" value="true"/> <property name="server" ref="mbeanServer"/> </bean> <bean id="jmxAttributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/> <bean id="serverConnector" class="ca.utoronto.sis.util.ResourceAwareConnectorServerFactoryBean"> <property name="server" ref="mbeanServer"/> <property name="objectName" value="connector:name=rmi"/> <property name="serviceUrl" value="service:jmx:rmi://localhost:${jmx.connector.port}/jndi/rmi://localhost:${rmi.registry.port}/swsjmx"/> <property name="environment"> <map> <!-- the following is only valid when the sun jmx implementation is used --> <entry key="jmx.remote.x.password.file" value="jmxusers.properties"/> </map> </property> </bean>
thanks in advance,
--
Haroon


Reply With Quote
