Core Services_154861861 - Gumtree/gumtree GitHub Wiki
Created by Tony Lam, last modified on Jul 29, 2010
JMX monitoring is a standard way to view and potentially control attribute of a component from a running system. With the help of Spring JMX exporter, developers can easily expose any bean object to the JMX server. When enabling JMX monitoring support in GumTree, two configuration steps are required.
1. Configure JMX server with RMI remote communication support
2. Export your bean with Spring's JMX exporter
Sometimes the monitor object cannot be instantiated by Spring, for example, if the monitor is an object composition of a service then above method of registering MBean becomes difficult.
To monitor a component with an attached monitor object, this component should implement the org.gumtree.core.util.monitor.IMonitorable interface for the system to know it has an attached monitor object. Then we use the org.gumtree.core.util.monitor.MonitorableMBeanExporter to export the IMonitorable component.
<bean id="connectorServer"
class="org.springframework.jmx.support.ConnectorServerFactoryBean">
<property name="serviceUrl"
value="service:jmx:rmi:///jndi/rmi://localhost:1234/jmxrmi" />
</bean>
<bean id="sicsProxyMonitor"
class="org.gumtree.gumnix.sics.core.SicsProxyMonitor">
</bean>
- Java Management Extensions (JMX) - Best Practices - http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/best-practices.jsp
- What is an MXBean? - http://weblogs.java.net/blog/2006/02/13/what-mxbean
Document generated by Confluence on Apr 01, 2015 00:11