/** * Unbind the RMI service from the registry on bean factory shutdown. */ @Override public void destroy() throws RemoteException { if (logger.isDebugEnabled()) { logger.debug("Unbinding RMI service '" + this.serviceName + "' from registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "'") : "")); } try { this.registry.unbind(this.serviceName); } catch (NotBoundException ex) { if (logger.isInfoEnabled()) { logger.info("RMI service '" + this.serviceName + "' is not bound to registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "' anymore") : ""), ex); } } finally { unexportObjectSilently(); } }
/** * Unbind the RMI service from the registry on bean factory shutdown. */ @Override public void destroy() throws RemoteException { if (logger.isDebugEnabled()) { logger.debug("Unbinding RMI service '" + this.serviceName + "' from registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "'") : "")); } try { this.registry.unbind(this.serviceName); } catch (NotBoundException ex) { if (logger.isInfoEnabled()) { logger.info("RMI service '" + this.serviceName + "' is not bound to registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "' anymore") : ""), ex); } } finally { unexportObjectSilently(); } }
/** * Removes the binding for the specified <code>name</code> in the rmiregistry * * @see java.rmi.registry.Registry#unbind(String) */ @Override public void unbind(String name) throws RemoteException, NotBoundException { if (!isRunning()) { throw new IllegalStateException("RMIRegistryService is not running"); } registry.unbind(name); } }
/** * <p> * Un-bind the scheduler from an RMI registry. * </p> */ private void unBind() throws RemoteException { String host = resources.getRMIRegistryHost(); // don't un-export if we're not configured to do so... if (host == null || host.length() == 0) { return; } Registry registry = LocateRegistry.getRegistry(resources .getRMIRegistryHost(), resources.getRMIRegistryPort()); String bindName = resources.getRMIBindName(); try { registry.unbind(bindName); UnicastRemoteObject.unexportObject(this, true); } catch (java.rmi.NotBoundException nbe) { } getLog().info("Scheduler un-bound from name '" + bindName + "' in RMI registry"); }
/** * <p> * Un-bind the scheduler from an RMI registry. * </p> */ private void unBind() throws RemoteException { String host = resources.getRMIRegistryHost(); // don't un-export if we're not configured to do so... if (host == null || host.length() == 0) { return; } Registry registry = LocateRegistry.getRegistry(resources .getRMIRegistryHost(), resources.getRMIRegistryPort()); String bindName = resources.getRMIBindName(); try { registry.unbind(bindName); UnicastRemoteObject.unexportObject(this, true); } catch (java.rmi.NotBoundException nbe) { } getLog().info("Scheduler un-bound from name '" + bindName + "' in RMI registry"); }
/** * Remove the local communication endpoint for the given class. * * @param className the class to remove. * @throws Exception in case of failure. */ private void unpublish(String className) throws Exception { registry.unbind(className); }
static synchronized void unregisterFactory() { if (!shuttingDown) { shuttingDown = true; try { if (factoryName != null && registry != null) registry.unbind(factoryName); } catch (Exception e) { e.printStackTrace(out); } } }
static synchronized void unregisterFactory() { if (!shuttingDown) { shuttingDown = true; try { if (factoryName != null && registry != null) registry.unbind(factoryName); } catch (Exception e) { e.printStackTrace(out); } } }
public void unbind(String name) throws RemoteException, NotBoundException { if (!isRunning()) throw new IllegalStateException("NamingService is not running"); m_registry.unbind(name); } }
public void stopServer() { try { registry.unbind(SERVICE_NAME); UnicastRemoteObject.unexportObject(registry, true); } catch (Exception e) { e.printStackTrace(); } } }
/** * Removes the binding for the specified <code>name</code> in the rmiregistry * * @see java.rmi.registry.Registry#unbind(String) */ public void unbind(String name) throws RemoteException, NotBoundException { if (!isRunning()) { throw new IllegalStateException("RMIRegistryService is not running"); } registry.unbind(name); } }
/** * Removes the binding for the specified <code>name</code> in the rmiregistry * * @see java.rmi.registry.Registry#unbind(String) */ public void unbind(String name) throws RemoteException, NotBoundException { if (!isRunning()) { throw new IllegalStateException("RMIRegistryService is not running"); } registry.unbind(name); } }
private boolean deregister() { try { registry.unbind("RemoteSleeConnectionService"); return UnicastRemoteObject.unexportObject(registry, false); } catch (RemoteException e) { throw new RuntimeException("Failed to unbind due to", e); } catch (NotBoundException e) { throw new RuntimeException("Failed to unbind due to", e); } }
@Override public void stopServer() { try { registry.unbind("SIPBalancer"); UnicastRemoteObject.unexportObject(registry, false); } catch (RemoteException e) { throw new RuntimeException("Failed to unbind due to", e); } catch (NotBoundException e) { throw new RuntimeException("Failed to unbind due to", e); } }
/** * @see stream.service.NamingService#unregister(java.lang.String) */ @Override public void unregister(String ref) throws Exception { String localRef = getLocalRef(ref); if (localRef == null) throw new Exception("Cannot resolve reference '" + ref + "' as local reference!"); log.debug("Service {} unregistered.", ref); registry.unbind(localRef); classes.remove(localRef); log.debug("After un-registration, classes are: {}", classes); }
public void unbind(String name) throws RemoteException, NotBoundException, java.net.MalformedURLException { getRegistry().unbind(name); }
/** * @see stream.service.NamingService#unregister(java.lang.String) */ @Override public void unregister(String ref) throws Exception { String localRef = getLocalRef(ref); if (localRef == null) throw new Exception("Cannot resolve reference '" + ref + "' as local reference!"); log.debug("Service {} unregistered.", ref); registry.unbind(localRef); classes.remove(localRef); log.debug("After un-registration, classes are: {}", classes); }
public void unbind(String name) throws NamingException { checkName(name); Registry registry = getRegistry(); try { registry.unbind(toRMIName(name)); } catch (NotBoundException ex) { throw new NameNotFoundException(name + " not found in RMI registry " + registry); } catch (RemoteException ex) { throw new NamingException("Remote exception: " + ex.getMessage()); } }
public void unbind(String name) throws NamingException { checkName(name); Registry registry = getRegistry(); try { registry.unbind(toRMIName(name)); } catch (NotBoundException ex) { throw new NameNotFoundException(name + " not found in RMI registry " + registry); } catch (RemoteException ex) { throw new NamingException("Remote exception: " + ex.getMessage()); } }
@Override protected void doStop() throws Exception { super.doStop(); try { Registry registry = endpoint.getRegistry(); registry.unbind(endpoint.getName()); } catch (Throwable e) { // do our best to unregister } UnicastRemoteObject.unexportObject(proxy, true); }