Tags

links:
http://static.springsource.org/spring/docs/3.0.x/reference/jmx.html

summary:
– MBeanExporter is the key, example here,

<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
    <property name="beans">
      <map>
        <entry key="bean:name=testBean1" value-ref="testBean"/>
      </map>
    </property>
  </bean>

– spring auto find the MBeanServer, but this server might not exists, so if we want to create one, then we need,

 <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/>

– if more than 1 then we use a MBeanServer locator

– all spring bean can easily be a MBean

– autodetect Mbean

<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
  <property name="autodetect" value="true"/>
</bean>
Advertisements