Object mbean = getExtensionMBean();
if (mbean != null) {
this.mbeanName = createExtensionMBeanName();
MBeanServer server = this.context.getContext().getMBeanServer();
if (server == null) {
throw new JBIException("null mBeanServer");
}
if (server.isRegistered(this.mbeanName)) {
server.unregisterMBean(this.mbeanName);
}
server.registerMBean(mbean, this.mbeanName);