public boolean unregisterMBean ( String name ) throws MBeanRegistrationException { synchronized ( mBeanServer ) { ObjectName toRemoveName ; try { toRemoveName = new ObjectName ( name ) ; } catch ( MalformedObjectNameException e ) { return false ; // bean with malformed can not be registered. } beansNames . remove ( toRemoveName ) ; try { mBeanServer . unregisterMBean ( toRemoveName ) ; return true ; } catch ( InstanceNotFoundException e ) { return false ; } } }
Unregisters MBean from platform MBean server .