code: public void unregisterMBean(final ObjectName name) throws JMException {
      if ((beanServer != null) &&
          beanServer.isRegistered(name) &&
          registeredMBeanNames.remove(name)) {
        beanServer.unregisterMBean(name);
      }
    }
docs: Unregister an MBean
  
  @param name of mbean
  @throws JMException