private void unregisterMBeans(){
  List<ObjectName> unregistered=new ArrayList<ObjectName>();
  for (  ObjectName name : mbeans) {
    try {
      mbeanserver.unregisterMBean(name);
      unregistered.add(name);
    }
 catch (    JMException e) {
    }
  }
  mbeans.removeAll(unregistered);
}

private void unregisterMBeans ( ) { List < ObjectName > unregistered = new ArrayList < ObjectName > ( ) ; for ( ObjectName name : mbeans ) { try { mbeanserver . unregisterMBean ( name ) ; unregistered . add ( name ) ; } catch ( JMException e ) { } } mbeans . removeAll ( unregistered ) ; }
unregister all jmx mbeans
