public static void unregisterMBean(String name) throws Exception {
  ObjectName mbeanObjectName=MBEANS.remove(name);
  if (mbeanObjectName != null) {
    MBeanServer mbeanServer=ManagementFactory.getPlatformMBeanServer();
    mbeanServer.unregisterMBean(mbeanObjectName);
  }
}

public static void unregisterMBean ( String name ) throws Exception { ObjectName mbeanObjectName = MBEANS . remove ( name ) ; if ( mbeanObjectName != null ) { MBeanServer mbeanServer = ManagementFactory . getPlatformMBeanServer ( ) ; mbeanServer . unregisterMBean ( mbeanObjectName ) ; } }
unregisters the mbean for the database if one is registered .
