Package java.rmi.registry

Examples of java.rmi.registry.Registry.lookup()


        // Get the reference to the RMI Registry and lookup RMIServer stub
        Registry registry;
        try {
            registry = LocateRegistry.getRegistry(this.hostName, this.port, sslRMIClientSocketFactory);
            try {
                this.stub = (RMIServer) registry.lookup("jmxrmi");
            }
            catch (NotBoundException nbe) {
                throw (IOException) new IOException(nbe.getMessage()).initCause(nbe);
            }
        }
View Full Code Here


            }
        }
        catch (IOException e) {
            registry = LocateRegistry.getRegistry(this.hostName, this.port);
            try {
                this.stub = (RMIServer) registry.lookup("jmxrmi");
            }
            catch (NotBoundException nbe) {
                throw (IOException) new IOException(nbe.getMessage()).initCause(nbe);
            }
        }
View Full Code Here

        SERVER_PORT_PROPERTY, DEFAULT_SERVER_PORT, 1, 65535);
      }

      Registry rmiRegistry = LocateRegistry.getRegistry(host, serverPort);
      serverProxy = (WatchdogServer)
    rmiRegistry.lookup(WatchdogServerImpl.WATCHDOG_SERVER_NAME);

            int jmxPort = wrappedProps.getIntProperty(
                    StandardProperties.SYSTEM_JMX_REMOTE_PORT, -1);
      localNodeId = dataService.getLocalNodeId();
            if (startServer) {
View Full Code Here

       }
    }

   try {
      Registry rmireg = LocateRegistry.getRegistry("valerie");
      Object o = rmireg.lookup("edu.brown.cs.ivy.mint.registry");
      if (o != null && !nohost) {
   p.setProperty("edu.brown.cs.ivy.mint.registryhost","valerie.cs.brown.edu");
       }
    }
   catch (Exception e) {
View Full Code Here

      }
      try {
    if (!noRmi) {
        Registry registry = LocateRegistry.getRegistry(
      serverHost, serverPort);
        return (DataStoreServer) registry.lookup(
      "DataStoreServer");
    } else {
        return new DataStoreClientRemote(serverHost, serverPort);
    }
      } catch (IOException e) {
View Full Code Here

            }         
         
            // TODO This code assumes that the server has already been started.
            // Perhaps it'd be better to block until the server is available?
            Registry registry = LocateRegistry.getRegistry(host, port);
            server = (NodeMappingServer) registry.lookup(
                         NodeMappingServerImpl.SERVER_EXPORT_NAME);     
           
            // Export our client object for server callbacks.
            int clientPort = wrappedProps.getIntProperty(
                                        CLIENT_PORT_PROPERTY,
View Full Code Here

            locator.setHomeInUse(home);
            storeLocalConfig(configuration);
            log.debug(this + " looking up registry: " + host + "," + port);
            Registry registry = LocateRegistry.getRegistry(host, registryPort);
            log.debug(this + " trying to connect to: " + home);
            Remote remoteObj = registry.lookup("remoting/RMIServerInvoker/" + port);
            log.debug("Remote RMI Stub: " + remoteObj);
            setServerStub((RMIServerInvokerInf) remoteObj);
            connected = true;
            break;
         }
View Full Code Here

        }

        try {
            Registry registry = LocateRegistry.getRegistry(rmiHost, rmiPort);

            rsched = (RemotableQuartzScheduler) registry.lookup(schedId);

        } catch (Exception e) {
            SchedulerException initException = new SchedulerException(
                    "Could not get handle to remote scheduler: "
                            + e.getMessage(), e);
View Full Code Here

            Exception exc = null;
            for (i = 0; i < LOOKUP_ATTEMPTS; i++) {
                try {
                    Registry registry = LocateRegistry.getRegistry(
                        registryHost, 2006);
                    user = (AppleUser) registry.lookup("AppleUser");
                    user.startTest();
                    break; //successfully obtained AppleUser
                } catch (Exception e) {
                    exc = e;
                    Thread.sleep(10000); //sleep 10 seconds and try again
View Full Code Here

public class EmptyName {
    public static void main(String[] args) throws Exception {
        Registry impl = LocateRegistry.createRegistry(0);
        Registry stub = (Registry) RemoteObject.toStub(impl);
        stub.bind("", stub);
        stub.lookup("");
        stub.rebind("", stub);
        stub.lookup("");
        stub.unbind("");
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.