Package java.rmi.registry

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


      "TEST FAILED: unrefereced() not invoked after " +
      ((double) TIMEOUT / 1000.0) + " seconds");
    }
      }

      registry.rebind(BINDING, stubB);
      System.err.println("bound second stub in registry");

      synchronized (obj.lock) {
    obj.unreferencedInvoked = false;
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

    public void exportAndBind() throws RemoteException, AlreadyBoundException,
            InterruptedException {
        Registry registry =
                LocateRegistry
                        .createRegistry(arguments.getRegistryPortNumber());
        registry.rebind(RMI_BINDING_NAME, this);
        Thread.sleep(2000);
        logger.info("RmiJournalReceiver is ready - journal directory is '"
                + arguments.getDirectoryPath().getAbsolutePath() + "'");
    }
View Full Code Here

         int port = 1099;
         Registry registry = LocateRegistry.getRegistry(port);

         String name = "//" + sessionId + "/RMICallbackServer";

         registry.rebind(name, this);
         System.out.println("RMICallbackServer bound");
      }
      catch(Exception e)
      {
         System.err.println("RMICallbackServer exception: " + e.getMessage());
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

    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

    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

    }
    IBankAccount stub = (IBankAccount) UnicastRemoteObject.exportObject(this, 0);

    // Bind the remote object's stub in the registry
    Registry registry = LocateRegistry.getRegistry(Network.getInstance().getPort());
    registry.rebind(this.id, stub);
    }
   
  @Override
  public Integer checkBalance(){
    return amount;
View Full Code Here

      HelloIF stub = (HelloIF) UnicastRemoteObject.exportObject(obj, 0);

      logger.debug("Locating registry on host '" + hostname + "'");
      Registry registry = LocateRegistry.getRegistry(hostname);
      logger.debug("Trying to register stub using name '" + HelloIF.servicename + "'");
      registry.rebind(HelloIF.servicename, stub);
      logger.debug("Stub registered");

      logger.info("Server ready");
    }
    catch (java.rmi.ConnectException e) {
View Full Code Here

            Compute stub =
                (Compute) UnicastRemoteObject.exportObject(engine, 0);
            System.out.println("Locate registry");
            Registry registry = LocateRegistry.getRegistry();
            System.out.println("Bind stub to registry");
            registry.rebind(name, stub);
            System.out.println("Server ready, waiting for client requests");
        } catch (Exception e) {
            System.err.println("ComputeEngine exception:");
            e.printStackTrace();
        }
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.