Package java.rmi.registry

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


                 String.class, null);
  int port = getInt(config, "registryPort",
        ActivationSystem.SYSTEM_PORT);
  Registry reg = LocateRegistry.getRegistry(host, port);
  ActivationSystem sys =
      (ActivationSystem) reg.lookup(ActivationSystem.class.getName());
  ProxyPreparer sysPreparer = getPreparer(config, "systemPreparer");
  sys = (ActivationSystem) sysPreparer.prepareProxy(sys);
  sys.shutdown();
    }
View Full Code Here


            // rmi.00=URL could not be null.
            throw new NullPointerException(Messages.getString("rmi.00")); //$NON-NLS-1$
        }
        RegistryURL url = getRegistryURL(name, false);
        Registry reg = LocateRegistry.getRegistry(url.host, url.port);
        return reg.lookup(url.name);
    }

    /*
     * Parse the given name and returns URL containing parsed parameters.
     */
 
View Full Code Here

                    }
                }
        });
        Runtime.getRuntime().addShutdownHook(agent.shutdownHook);

        ProcessManagerRemoteIF manager = (ProcessManagerRemoteIF) reg.lookup(processManagerName);
        agent.init(agentName,manager);

        agent.waitForShutdown();
        agent.notifyManagerOnExit();
        if(agent.exitedFromParent) {
View Full Code Here

        try {
            registry = rmiRegistries.get(Integer.toString(rmiURI.port));
            if (registry == null) {
                try {
                    registry = LocateRegistry.getRegistry(rmiURI.port);
                    registry.lookup(rmiURI.serviceName);
                } catch (RemoteException e) {
                    registry = LocateRegistry.createRegistry(rmiURI.port);
                } catch (NotBoundException e) {
                    // Ignore
                }
View Full Code Here

            // Requires permission java.net.SocketPermission "host:port", "connect,accept,resolve"
            // in security policy.
            Registry registry = LocateRegistry.getRegistry(rmiURI.host, rmiURI.port);

            if (registry != null) {
                remoteService = registry.lookup(rmiURI.serviceName);
            }
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
            rmiExec.setStackTrace(e.getStackTrace());
            throw rmiExec;
View Full Code Here

        String name = url.getPath();
        if (name != null && name.startsWith("/")) {
          name = name.substring(1);
        }
        Registry registry = LocateRegistry.getRegistry(host, port, this.registryClientSocketFactory);
        stub = registry.lookup(name);
      }
      else {
        // Can proceed with standard RMI lookup API...
        stub = Naming.lookup(getServiceUrl());
      }
View Full Code Here

    checkName(name);
    name = toRMIName(name);
    if (name.length() == 0) return new RMIContext(environment);
    Registry registry = getRegistry();
    try {
      return registry.lookup(name);
    } catch (NotBoundException ex) {
      throw new NameNotFoundException(name + " not found in RMI registry " + registry);
    } catch (RemoteException ex) {
      throw new NamingException("Remote exception: " + ex.getMessage());
    }
View Full Code Here

      {
         storeLocalConfig(configuration);
         String host = locator.getHost();
         int port = getRegistryPort(locator);
         Registry regsitry = LocateRegistry.getRegistry(host, port);
         Remote remoteObj = regsitry.lookup("remoting/RMIServerInvoker/" + locator.getPort());
         log.debug("Remote RMI Stub: " + remoteObj);
         setServerStub((RMIServerInvokerInf) remoteObj);
         connected = true;
      }
      catch(Exception e)
View Full Code Here

         {
            try
            {
               sync.wait(150);
               Registry registry = LocateRegistry.getRegistry("localhost", cfg.getProcessPort());
               stub = (ServerMain) registry.lookup(ServerMain.class.getName());

               break;
            }
            catch (Throwable t)
            {
View Full Code Here

        }

        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);
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.