PDA

View Full Version : Beans from multiple JVMs in a single MBean server



David W
Nov 22nd, 2006, 03:23 PM
I have an application that consists of a number of components that each run in their own JVM. I have a number of mbeans in each component and i can correctly create a mbean server and view the mbeans.

I would like to create a single mbean server and have all the mbeans displayed in this server. This is so I can manage all my Mbeans from the one Jconsole instance.

I am rather new to JMX but i have the impression that I can't do that. Is it possible to register mbeans with an mbean server created in a seperate jvm?

Is this what the jsr160 connectors are for?

Costin Leau
Dec 7th, 2006, 06:05 AM
You want 'federation' of your MBeans and AFAIK, this is covered in the second version of the JMX specs so it will supported out-of-the-box by the API.
However, now you have various tools to tackle this problem; you can connect remotely to the MBean server and use that locally through the JMX proxying functionality offered by Spring which means you can just define an interface and at runtime Spring will automatically connect to the remote MBean and give you access to those property.
See the reference documentation for more information.
You can also use jManage, an JMX library for managing JMX servers and MBeans - I think it contains some of the functionality you want.