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!
'Remote Procedure Call' is a distributed computing concept where a process running on one host can call a procedure on another remote host. RMI in Java is one implementation of this concept.
MBeans are bean classes that can be registered with a JMX bus to listen to events arriving on the bus or to send events on the bus or to collect various sorts of data from the other participating Mbeans etc. It is most often used for health monitoring of application servers etc. It can check the number of active connections, amount of free memory and many other statistics to an analysis engine. And yes, they can be invoked remotely using an RPC mechanism. This is vital to its functioning as data collectors since in a cluster of application servers the data has to be fetched from all the collectors and collated at one place for analysis.