Package java.rmi.registry

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


    if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }
        Bank stub =(Bank)UnicastRemoteObject.exportObject(this, 0);
        Registry registry = LocateRegistry.getRegistry();
        registry.rebind(bankName, stub);
  }
 
  public void unbind()
  {
    try {
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);
        reg.rebind(url.name, obj);
    }

    public static void unbind(String name) throws RemoteException, NotBoundException,
            MalformedURLException {
        if (name == null) {
View Full Code Here

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

  public void rebind(String name, Object obj) throws NamingException {
    checkName(name);
    try {
      Registry registry = getRegistry();
      registry.rebind(toRMIName(name), (Remote) obj);
    } catch (RemoteException ex) {
      ex.printStackTrace();
      throw new NamingException("Remote exception: " + ex.getMessage());
    }
  }
View Full Code Here

      ServerMainImpl obj = new ServerMainImpl();
      ServerMain stub = (ServerMain) UnicastRemoteObject.exportObject(obj, 0);

      Registry registry = LocateRegistry.getRegistry(port);
      registry.rebind(ServerMain.class.getName(), stub);

      System.out.println("Hibernate process ready");

   }
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

                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

                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

            /* 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

                System.err.println("Continuing...");
            }
        }
        try {
            Registry reg = LocateRegistry.getRegistry(port);
            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

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.