List of usage examples for java.rmi NoSuchObjectException printStackTrace
public void printStackTrace()
From source file:com.rk.grid.cluster.master.Broker.java
/** * @throws RemoteException //from ww w .jav a 2 s . co m * @throws InterruptedException * @throws NoSuchObjectException * */ @SuppressWarnings("unchecked") public void shutDown() throws RemoteException, InterruptedException { for (int ii = 0; ii <= this.processList.size(); ii++) { this.dispatch((IExecutable<V>) IExecutable.POISON); } for (Process process : this.processList) { if (process != null) { int exitValue = process.waitFor(); Broker.log("Exit value for Process " + process + " = " + exitValue); } } try { UnicastRemoteObject.unexportObject(workQueue, true); } catch (NoSuchObjectException e) { e.printStackTrace(); } try { UnicastRemoteObject.unexportObject(resultsHandler, true); } catch (NoSuchObjectException e) { e.printStackTrace(); } try { UnicastRemoteObject.unexportObject(progressMonitor, true); } catch (NoSuchObjectException e) { e.printStackTrace(); } this.rmiServiceExporter.destroy(); Broker.log("Shutting down"); }
From source file:de.clusteval.framework.ClustevalBackendServer.java
/** * A helper method for {@link #shutdown(String, long)}, which terminates * this framework after a certain timeout. * //from w w w . j a v a 2s.c om * <p> * This method first interrupts the supervisor thread (see * {@link SupervisorThread}) and waits for its termination until the timeout * was reached. * * <p> * Then the backend server instance is unregistered from the RMI registry * and the repository of this framework is removed from the set of all * registered repositories. * * @throws InterruptedException * */ private void terminate(final long forceTimeout) throws InterruptedException { this.repository.terminateSupervisorThread(); try { Registry registry = LocateRegistry.getRegistry(port); registry.unbind("EvalServer"); UnicastRemoteObject.unexportObject(this, true); } catch (NoSuchObjectException e) { e.printStackTrace(); } catch (AccessException e) { e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); } catch (NotBoundException e) { e.printStackTrace(); } /* * unregister repository */ Repository.unregister(this.repository); // should work without, just to be sure // System.exit(0); }