Is it possible to add a new MBean at runtime? My application is managing external devices running different software releases. When a new device gets added to my application and its of a release for which I don't already have an MBean, I want to add a new one dynamically.
This MBean would then load the device release specific version of the jars using a custom classloader.
Am I way off track here or is it possible to do above?
Sure. All the MBeans in JBoss are loaded during runtime. :-)
You can create MBeans yourself and install them using the MBeanServer ... Look at the JavaDoc. Just don't forget to unregister them during undeployment.