try {
registry = LocateRegistry.getRegistry(info.getHost(),
info.getPort());
} catch (RemoteException exception) {
throw new ConnectException("Failed to get registry"
+ ", host=" + info.getHost()
+ ", port=" + info.getPort(),
exception);
}
String name = RegistryHelper.getName(_remoteURI);
RMIInvokerFactory factory;
try {
factory = (RMIInvokerFactory) registry.lookup(name);
} catch (RemoteException exception) {
throw new ConnectException("Failed to lookup connection proxy"
+ ", host=" + info.getHost()
+ ", port=" + info.getPort(),
exception);
} catch (NotBoundException exception) {
throw new ConnectException("Connection proxy=" + name
+ " not bound in "
+ "registry, host=" + info.getHost()
+ ", port=" + info.getPort(),
exception);
}