code: public static void unpopulateMBeanServer() {
  		if(!populated)
  			return;
  		
  		synchronized (lock) {
  			populated = false;
  			
  			if (storageManager != null && storageManager.getPublicName() != null) {
  				logger.info("Unregistering the StorageManager MXBean");
  				try { 
  					storageManager.deregister(); 
  					storageManager.awaitJobTermination(2 * 60);
  				} catch(Exception ex) {
  					logger.warn("Can't unregister StorageManager MXBean.", ex);
  				}
  			}
  			if (serverMonitor != null && serverMonitor.getPublicName() != null) {
  				logger.info("Unregistering the ServerMonitor MXBean");
  				try { 
  					serverMonitor.deregister(); 
  					serverMonitor.shutdown();
  				} catch(Exception ex) {
  					logger.warn("Can't unregister ServerMonitor MXBean.", ex);
  				}
  			}
  			
  			storageManager = null;
  			serverMonitor = null;
  		}
  	}
docs: Deregisters MBeans/MXBeans.