List of usage examples for java.rmi ConnectException getMessage
public String getMessage()
From source file:net.sqs2.omr.session.service.AbstractRemoteExecutorManager.java
private AbstractTaskTracker<T, D> createRemoteTaskTracker(String uriString, long remoteKey, long sessionID) { try {/*from w ww . j ava 2 s.c o m*/ URI uri = new URI(uriString); Registry registry = LocateRegistry.getRegistry(uri.getHost(), uri.getPort()); Logger.getLogger(getClass().getName()) .info("REGISTRY:\n" + StringUtil.join(registry.list(), "\n") + "\nLOOKUP:\n" + uri.getPath()); RemoteSessionSourceServer remoteSessionService = (RemoteSessionSourceServer) registry .lookup(uri.getPath()); long result = remoteSessionService.ping(remoteKey); // authentication if (AbstractTaskTracker.DEBUG_CLUSTER_MODE) { Logger.getLogger("executor").info("RemoteSessionService.URI=" + uri); Logger.getLogger("executor").info("Hello=" + result); } AbstractTaskTracker<T, D> remoteTaskTracker = createTaskTracker(this.taskTracker, remoteSessionService, remoteKey); this.remoteTaskTrackerMap.put(uriString, remoteTaskTracker); return remoteTaskTracker; } catch (ConnectException ex) { Logger.getLogger("executor").severe("ConnectException:" + uriString); } catch (RemoteException ex) { Logger.getLogger("executor").severe("RemoteException:" + uriString); } catch (NullPointerException ex) { Logger.getLogger("executor").severe("NullPointerException:" + uriString); } catch (NotBoundException ex) { ex.printStackTrace(); Logger.getLogger("executor").severe("NotBoundException:" + uriString); } catch (URISyntaxException ex) { Logger.getLogger("executor").severe("URISyntaxException:" + ex.getMessage()); } return null; }