Apr 25th, 2007, 10:42 AM
How to unregister mbean
I am registering a user session mbean with the MBeanExporter usging the following code at runtime:
MBeanExporter mBeanExporter =
String objectName =
"com.company.product:userSession=" + userSession.getId();
When user session ends (user logs out), I'd like to unregister the the mbean, so that it disappears from the JMX console.
Is there a way in Spring to unregister an mbean at runtime? Is the only way to unregister an mbean at runtime to get an explicit reference to MBeanServer?
May 26th, 2007, 08:21 AM
I believe that is the only way. That's one of the uses of the *MBeanServerFactoryBean.