List of usage examples for javax.management MBeanServerConnection unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException, IOException;
From source file:org.helios.collector.jmx.connection.AbstractMBeanServerConnectionFactory.java
/** * Unregisters an MBean identified by the passed ObjectName * @param objectName//from ww w . j av a 2 s . c o m * @throws InstanceNotFoundException * @throws MBeanRegistrationException * @throws IOException */ @Override @ManagedOperation public void unregisterMBean(ObjectName objectName) throws InstanceNotFoundException, MBeanRegistrationException, IOException { validateConn(); MBeanServerConnection conn = null; try { conn = getPooledConnection(); conn.unregisterMBean(objectName); } catch (MBeanServerConnectionFactoryException e) { throw new RuntimeException("Failed to get pooled connection", e); } finally { try { this.returnPooledConnection(conn); } catch (Exception e) { log.debug(e.getMessage()); } } }