@Override public void destroy() throws Exception { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.destroy", getName())); } try { endpoint.destroy(); } finally { if (oname != null) { if (mserver == null) { Registry.getRegistry(null, null).unregisterComponent(oname); } else { // Possibly registered with a different MBeanServer try { mserver.unregisterMBean(oname); } catch (MBeanRegistrationException | InstanceNotFoundException e) { getLog().info(sm.getString("abstractProtocol.mbeanDeregistrationFailed", oname, mserver)); } } } if (rgOname != null) { Registry.getRegistry(null, null).unregisterComponent(rgOname); } } }
endpoint.destroy(); } catch (Exception e) { getLog().error(sm.getString("abstractProtocolHandler.destroyError",
@Override public void destroy() { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.destroy", getName())); } try { endpoint.destroy(); } catch (Exception e) { getLog().error(sm.getString("abstractProtocolHandler.destroyError", getName()), e); } if (oname != null) { Registry.getRegistry(null, null).unregisterComponent(oname); } if (tpOname != null) Registry.getRegistry(null, null).unregisterComponent(tpOname); if (rgOname != null) Registry.getRegistry(null, null).unregisterComponent(rgOname); }
@Override public void destroy() { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.destroy", getName())); } try { endpoint.destroy(); } catch (Exception e) { getLog().error(sm.getString("abstractProtocolHandler.destroyError", getName()), e); } if (oname != null) { Registry.getRegistry(null, null).unregisterComponent(oname); } if (tpOname != null) Registry.getRegistry(null, null).unregisterComponent(tpOname); if (rgOname != null) Registry.getRegistry(null, null).unregisterComponent(rgOname); }
@Override public void destroy() { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.destroy", getName())); } try { endpoint.destroy(); } catch (Exception e) { getLog().error(sm.getString("abstractProtocolHandler.destroyError", getName()), e); } if (oname != null) { Registry.getRegistry(null, null).unregisterComponent(oname); } if (tpOname != null) Registry.getRegistry(null, null).unregisterComponent(tpOname); if (rgOname != null) Registry.getRegistry(null, null).unregisterComponent(rgOname); } }