PanMX removes the pain from developing MBeans. It was a toolkit I developed years ago to make things less painful. I have been cleaning up my subversion repositories and I figured it may be useful for others. So here it is released to the public at large.
The user can use Java 1.5 Annotations to define the MBean interface or allow the toolkit to derive the MBean interface using reflection.
To expose an instance of the Liver class as a ModelMBean the user could add the following code;
To expose the object as an RMXBean the user could use the following code;
Accessing an MBean on the ‘Client’
The user can access the MBeans using the standard mechanisms. Additionally if the user decides to use RMXBeans and has defined the management interface using a java interface then the object can be dynamically proxied. This means that the user can interact with the object as if it was a local object.
The following code example demonstrates accessing a RMXBean as a dynamic proxy.