if (context.getJMXManager() != null)
{
// register MBean in MbeanServer
ManagementManager mgmtMgr = this.nucleusContext.getJMXManager();
ManagementServer mgmtServer = mgmtMgr.getManagementServer();
connMgrRuntime = new ConnectionManagerRuntime();
String mbeanName = mgmtMgr.getDomainName() + ":InstanceName=" + mgmtMgr.getInstanceName() +
",Type=" + ClassUtils.getClassNameForClass(connMgrRuntime.getClass()) +
",Name=ConnectionManagerRuntime";
mgmtServer.registerMBean(connMgrRuntime, mbeanName);
}