public void remove ( ) { Logger logger = getLogger ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Closing " + toString ( ) ) ; } final MBeanServer mbeanServer = sleeContainer . getMBeanServer ( ) ; try { mbeanServer . unregisterMBean ( getObjectName ( ) ) ; } catch ( Exception e ) { logger . error ( "failed to remove " + toString ( ) , e ) ; } // remove all usage param if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Removing all named usage parameters of " + toString ( ) ) ; } for ( String name : usageMBeans . keySet ( ) ) { try { _removeUsageParameterSet ( name , false ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } } // also remove the default try { removeUsageParameterSet ( ) ; } catch ( Throwable e ) { logger . error ( e . getMessage ( ) , e ) ; } }
Removes the mbean