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>
Spring JMX and multicall methods in z/OS®
WebSphere Application Server Version 6.1 or later supports Spring JMX on multi-servant region servers. However, deployment options are limited because you cannot use the Spring Framework to specify platform-specific fields in the MBean descriptor. The application server defaults to the unicall strategy so that only one instance of the MBean, in a single indeterminate servant region, is asked to run a request. For some scenarios, this behavior is suitable, but more often, an application needs to declare a combination of multicall and unicall methods, and include some aggregation logic.