question: public static void unregisterMBean ( Class < ? > mbeanInterface ) { MBeanServer mbs = ManagementFactory . getPlatformMBeanServer ( ) ; try { ObjectName name = generateMBeanObjectName ( mbeanInterface ) ; if ( mbs . isRegistered ( name ) ) { logger . info ( "Unregistering mbean: " + name . toString ( ) ) ; mbs . unregisterMBean ( name ) ; } else { logger . warn ( "Ignoring attempt to unregister unknown mbean: " + name . toString ( ) ) ; } } catch ( Exception e ) { throw new ServerRuntimeException ( "Unable to unregister mbean: interface=" + mbeanInterface , e ) ; } }
target:  Server helper method to register a JMX MBean. MBeans are registered by a combination of their MBean interface and the custom mbeanName argument. The mbeanName permits multiple mBeans to be registered under the same name.