Package java.rmi.registry

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


        }
        try {
            Registry reg = LocateRegistry.getRegistry(port);
            log.info("Creating JMeter engine on host "+hostName);
            backingEngine = new StandardJMeterEngine(hostName);// see setHost()
            reg.rebind(JMETER_ENGINE_RMI_NAME, this);
            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


                System.err.println("Continuing...");
            }
        }
        try {
            Registry reg = LocateRegistry.getRegistry(this.rmiPort);
            reg.rebind(JMETER_ENGINE_RMI_NAME, this);
            log.info("Bound to registry on port " + this.rmiPort);
        } 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

    try {
      ncs = new NumberCruncherServer();
      logger.info("Creating registry.");

      Registry registry = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
      registry.rebind("Factor", ncs);
      logger.info("NumberCruncherServer bound and ready.");
    } catch (Exception e) {
      logger.error("Could not bind NumberCruncherServer.", e);

      return;
View Full Code Here

            else
              dr = false;
            SPRemote spclient = new SPClient(dr);
            SPRemote stub = (SPRemote) UnicastRemoteObject.exportObject(spclient, 0);
            Registry registry = LocateRegistry.getRegistry();
            registry.rebind("SPRemote", stub);
            System.out.println("ServerPlus Client Started.");
        } catch (Exception e) {
            System.err.println("ServerPlus Client exception:");
            e.printStackTrace();
        }
View Full Code Here

            LocateRegistry.createRegistry(50000);
           
            // get a reference to the registry
            Registry registry = LocateRegistry.getRegistry(50000);          
           
            registry.rebind("BookServer", stub);
            System.out.println("BookServer bound");
        } catch (Exception e) {
            System.err.println("BookServer exception:");
            e.printStackTrace();
        }
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

                System.err.println("Continuing...");
            }
        }
        try {
            Registry reg = LocateRegistry.getRegistry(this.rmiPort);
            reg.rebind(JMETER_ENGINE_RMI_NAME, this);
            log.info("Bound to registry on port " + this.rmiPort);
        } 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.", ex);
View Full Code Here

   * @throws RemoteException
   * @throws SQLException
   */
  public static void main(String[] args) throws RemoteException, SQLException {
    Registry registry = LocateRegistry.createRegistry(DatabaseStart.SERVER_PORT);
    registry.rebind(DatabaseInterface.class.getCanonicalName(), Database.getInstance());
    System.out.println("Database server up and running ...");
  }

}
View Full Code Here

    try {

      final int SERVER_PORT = 6666;

      Registry registry = LocateRegistry.createRegistry(SERVER_PORT);
      registry.rebind("DBServer", DBServerImpl
          .getInstance());
      System.out.println("DatabaseServer Running on port " + SERVER_PORT);

    } catch (RemoteException e) {
      e.printStackTrace();
View Full Code Here

   */
  public void createBootstrap(String name, int number) throws RemoteException {
    P2PMemberController.logger.debug("Controller: create bootstrap node");
    Registry registry = LocateRegistry.createRegistry(P2PMemberController.PORT);
    this.node = new Node(name, number);
    registry.rebind(Node.class.getCanonicalName(), this.node);
    this.bootstrap = this.node;
  }

  /**
   * Checks if the bootstrap node exists.
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.