What is the purpose of JMX and what is it used for? I have been scanning through some of the tutorials on JMX and all they do is register some Mbeans and invoke those Mbeans from jconsole. If that is its purpose, then what is the difference between JMX and RMI (remote procedure call)?
Thanks in advance!
Yes in JMX we register our objects in mbean server using the ObjectName
and objectReference
. We can then change attributes or invoke methods remotely.
A connector makes a Java Management Extensions (JMX) technology MBean server accessible to remote Java technology-based clients.Many different implementations of connectors are possible. In particular, there are many possibilities for the protocol used to communicate over a connection between client and server.Some Connectors defined by the JMX Remote API specification are
If you look at the above architecture a connector provides full remote access to the MBeanServer API using various communication frameworks (RMI, IIOP, JMS, WS-* …
), while an adaptor adapts the API to another protocol (SNMP, …)
or to Web-based GUI (HTML/HTTP, WML/HTTP, …).
Generally we use JMX connectors to connect to the MBean server but we can chose other connectors as well.
To sum up JMX is an java technology and RMI is for Remote Method Invocation a Java specific implementation of a Remote Procedure Call interface which can be used in the JMX to communicated remotely.