An Introduction to JMXRemote
Added 31 Jul 2008
The Java Management Extensions (JMX) API has been added into J2SE 1.5 as a standard Java API. The package javax.management.remote makes it possible to remotely access a JMX MBean server.
On the server side, JMXConnectorServer is a connector server MBean registered in the MBeanServer. It listens for client connection requests and creates a connection for each one. On the client side, JMXConnector is used to establish a connection to a connector server. An MBeanServerConnection--a super-interface of MBeanServer--can be retrieved from the JMXConnector,
representing a remote MBean server. The client can use this class to do
most MBean server operations, such as MBean creation and attribute
access, and MBean operation invocation. Actually, javax.management.MBeanServerConnection is a super-interface of javax.management.MBeanServer.
But in some circumstances, that is not enough. In a JMX-enabled
project, it is a common requirement to register a local MBean to the
remote MBean server. This registration function--registerMBean()--is only defined in MBeanServer, but not supported in javax.management.MBeanServerConnection.
JMXRemote is a project to satisfy this requirement. It provides a remote MBean server delegation to the local application as if it were a local MBean server.
This article introduces the features of JMXRemote project with samples and implementation details. Furthermore, it has a section to introduce how to integrate JMXRemote with the Spring framework.