Package java.rmi.registry

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


   
    serverInstance = new GlobalServerImpl(registry);
   
    // Ensure compliancy with previous JVM versions.
    GlobalServer stub = (GlobalServer) UnicastRemoteObject.exportObject(serverInstance);   
    registry.rebind(STUB_NAME, stub);
   
    System.out.println("Game daemon started");
   
    // Server is now waiting...
    while (true) {
View Full Code Here


          catch(Exception e) {
              throw new RemoteException("can't get inet address.");           
          }
          logger.info("this address = " + address + ", port = " + this.port);
          registry = LocateRegistry.createRegistry(this.port);
          registry.rebind("RemoteServer", this);
    } else {
      logger.fatal("no starting remote server cause no port definition.");
    }
  }
}
View Full Code Here

    log.info("Starting backing engine on " + port);
    log.debug("This = " + this);
    try {
      Registry reg = LocateRegistry.getRegistry(port);
      backingEngine = new StandardJMeterEngine(InetAddress.getLocalHost().getHostName());
      reg.rebind("JMeterEngine", this); // $NON-NLS-1$
      log.info("Bound to registry on port " + port);
    } catch (Exception ex) {
      log.error("rmiregistry needs to be running to start JMeter in server " + "mode\n\t" + ex.toString());
      // Throw an Exception to ensure caller knows ...
      throw new RemoteException("Cannot start. See server log file.");
View Full Code Here

            /* ignore */
        }

        Registry registry = LocateRegistry.getRegistry(_port);

        registry.rebind(_id, _remote);

        __log.debug("Bound JCA server as \"" + _id + "\" on registry port " + _port);
    }

    public synchronized void stop() throws RemoteException {
View Full Code Here

            + ": Error starting new BrowserManagerServer.", re);
        System.exit(2);
      }

      try {
        rmiRegistry.rebind(entry.registrationKey, server);
      } catch (RemoteException re) {
        logger.log(Level.SEVERE, entry.registrationKey + " server: " + server
            + " port: " + portArg + " Error on rebind to "
            + entry.registrationKey, re);
        System.exit(3);
View Full Code Here

            /* ignore */
        }

        Registry registry = LocateRegistry.getRegistry(_port);
       
        registry.rebind(_id, _remote);
       
        __log.debug("Bound JCA server as \"" + _id + "\" on registry port " + _port);
    }

    public synchronized void stop() throws RemoteException {
View Full Code Here

      RMIServerSocketFactory ssf = new RemotingRMIServerSocketFactory(getServerSocketFactory(), BACKLOG_DEFAULT, bindHost, getTimeout());
      RMIClientSocketFactory csf = getRMIClientSocketFactory(clientConnectHost);
      stub = UnicastRemoteObject.exportObject(this, bindPort, csf, ssf);

      log.debug("Binding server to \"remoting/RMIServerInvoker/" + bindPort + "\" in registry");
      registry.rebind("remoting/RMIServerInvoker/" + bindPort, this);

      unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader());
      marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader());
   }
View Full Code Here

                    .getRMIRegistryHost(), resources.getRMIRegistryPort());
        }

        String bindName = resources.getRMIBindName();
       
        registry.rebind(bindName, exportable);

        getLog().info("Scheduler bound to RMI registry under name '" + bindName + "'");
    }

    /**
 
View Full Code Here

    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

        try {

            if (registry != null) {

                registry.rebind("myself", registry);

                Remote myself = Naming.lookup("rmi://localhost/myself");

                System.err.println("Test PASSED");
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.