JMX and MBeans with the Spring Framework
WebSphere® Application Server Version 6.1 and later supports Spring Java™ Management Extensions (JMX) MBeans.
JMX and MBeans
To use the support for Spring JMX MBeans, you must register the JMX MBeans with the MBeanServer instance of the container manager in the application server. If you do not specify a server property for the MBean, the MBeanExporter object attempts to detect an MBeanServer instance that is running. Therefore, for an application that runs in the application server, the Spring Framework would locate the MBeanServer instance of the container.
Do not use the MBeanServerFactory class to instantiate an MBeanServer instance and then inject that instance into the MBeanExporter object. Also, do not use the Spring Framework ConnectorServerFactoryBean or JMXConnectorServer classes to expose the local MBeanServer instance to clients by opening inbound JMX ports.
Registering Spring MBeans in the application server
WebSphere:cell=99T73GDNode01Cell,name=JmxTestBean,node=99T73GDNode01,process=server1,type=JmxTestBeanImpl
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="beans">
<map> <entry key="JmxTestBean" value-ref="testBean" /> </map>
</property>
<property name="namingStrategy" ref="websphereNamingStrategy" />
...
</bean>
MBeans and notifications
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="beans">
<map>
<entry key="JmxTestBean" value-ref="testBean" />
</map>
</property>
<property name="namingStrategy" ref="websphereNamingStrategy" />
<property name="notificationListenerMappings">
<map>
<entry key="WebSphere:cell=99T73GDNode01Cell, name=JmxTestBean,
node=99T73GDNode01, process=server1, type=JmxTestBeanImpl">
<bean class="client.MBeanListener" />
</entry>
</map>
</property>
</bean>