/** * Unexport the RMI registry on bean factory shutdown, * provided that this bean actually created a registry. */ @Override public void destroy() throws RemoteException { if (this.created) { logger.debug("Unexporting RMI registry"); UnicastRemoteObject.unexportObject(this.registry, true); } }
/** * Unexport the registered RMI object, logging any exception that arises. */ private void unexportObjectSilently() { try { UnicastRemoteObject.unexportObject(this.exportedObject, true); } catch (NoSuchObjectException ex) { if (logger.isInfoEnabled()) { logger.info("RMI object for service '" + this.serviceName + "' is not exported anymore", ex); } } }
@Override protected void unexportImpl(RemoteStreamServer<?, ?> server) throws Exception { UnicastRemoteObject.unexportObject(server, true); } }
/** * Unexport the RMI registry on bean factory shutdown, * provided that this bean actually created a registry. */ @Override public void destroy() throws RemoteException { if (this.created) { logger.debug("Unexporting RMI registry"); UnicastRemoteObject.unexportObject(this.registry, true); } }
/** * Unexport the registered RMI object, logging any exception that arises. */ private void unexportObjectSilently() { try { UnicastRemoteObject.unexportObject(this.exportedObject, true); } catch (NoSuchObjectException ex) { if (logger.isInfoEnabled()) { logger.info("RMI object for service '" + this.serviceName + "' is not exported anymore", ex); } } }
public static void cleanup() { for (Iterator i = remotes.iterator(); i.hasNext(); ) { Object remoteObject = i.next(); try { UnicastRemoteObject.unexportObject((Remote) remoteObject, true); } catch (Exception e) { } } } }
public void stop() throws IOException { if (connector != null) { try { connector.stop(); } finally { connector = null; } } if (rmiRegistry != null) { try { UnicastRemoteObject.unexportObject(rmiRegistry, true); } catch (NoSuchObjectException e) { throw new IOException("Could not un-export our RMI registry", e); } finally { rmiRegistry = null; } } } }
public void stopConnectorServer() throws IOException { synchronized (JMXListener.class) { if (JMX_CS != null) { JMX_CS.stop(); LOG.info("ConnectorServer stopped!"); JMX_CS = null; } // deregister the RMI registry if (rmiRegistry != null) { UnicastRemoteObject.unexportObject(rmiRegistry, true); } } }
/** * Stops this MBean: rmiregistry cannot accept anymore incoming calls * * @see #start */ @Override public synchronized void stop() throws NoSuchObjectException { if (isRunning()) { isRunning = !UnicastRemoteObject.unexportObject(registry, true); } }
public void unreferenced() { try { UnicastRemoteObject.unexportObject(this, false); } catch (NoSuchObjectException e) { LOG.warn("Failed to unexport RMI debugger listener", e); } }
public static void destroyRmiRegistry(Registry reg) { try { if (reg != null) { java.rmi.server.UnicastRemoteObject.unexportObject(reg, true); } } catch (NoSuchObjectException e) { throw new RuntimeException(e); } } }
public synchronized void stopAgent() { if (!this.running) { return; } if (logger.isDebugEnabled()) { logger.debug("Stopping jmx manager agent"); } try { jmxConnectorServer.stop(); UnicastRemoteObject.unexportObject(registry, true); } catch (Exception e) { throw new ManagementException(e); } this.running = false; }
@Override void shutdownSpi() { server.stop(); try { UnicastRemoteObject.unexportObject(this.debugger, true); } catch (Exception e) { } RmiDebuggedEnvironmentImpl.cleanup(); } }
UnicastRemoteObject.unexportObject(rmiRegistry, true);
UnicastRemoteObject.unexportObject(registry, true); LOG.debug("Unexported JMX RMI Registry"); } catch (NoSuchObjectException e) {
/** * <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"); }
UnicastRemoteObject.unexportObject( callback, true );
/** * Stop the rmiregistry if it was started by this class. * * @throws RemoteException */ protected void stopRegistry() throws RemoteException { if (registryCreated) { // the unexportObject call must be done on the Registry object returned // by createRegistry not by getRegistry, a NoSuchObjectException is // thrown otherwise boolean success = UnicastRemoteObject.unexportObject(registry, true); if (success) { LOG.debug("rmiregistry unexported."); } else { LOG.warn("Could not unexport rmiregistry."); } } }
@Override public void destroy() throws RemoteException { try { doDestroy(); if (countDownLatch != null) { countDownLatch.countDown(); } } finally { UnicastRemoteObject.unexportObject(RemoteSPI.this, true); } }