e.printStackTrace();
}
} else {
try {
m_objectName = new ObjectName(getObjectNameString());
ObjectInstance instance = ManagementFactory
.getPlatformMBeanServer().registerMBean(m_MBean,
m_objectName);
// we must retrieve object name used to register the MBean.
// It can have been changed by preRegister method of
// MBeanRegistration interface.
if (m_registerCallbacks) {
m_objectName = instance.getObjectName();
}
m_registered = true;
} catch (Exception e) {
error("Registration of MBean failed.", e);