Package java.rmi.registry

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


            // unregister myself from the RMI registry

            Registry registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT);

            String name = RMI_SERVER_PREFIX + server.getServerID();
            registry.unbind(name);
            log.info("unregistered " + name + " from registry");

            name = NAMING_SERVER_PREFIX + server.getServerID();
            registry.unbind(name);
            log.info("unregistered " + name + " from registry");
View Full Code Here


            String name = RMI_SERVER_PREFIX + server.getServerID();
            registry.unbind(name);
            log.info("unregistered " + name + " from registry");

            name = NAMING_SERVER_PREFIX + server.getServerID();
            registry.unbind(name);
            log.info("unregistered " + name + " from registry");
         }
         catch(Exception e)
         {
            log.error("Failed to unregister", e);
View Full Code Here

         //First unregister from the RMI registry
         Registry registry = LocateRegistry.getRegistry(RMITestServer.DEFAULT_REGISTRY_PORT);

         String name = RMITestServer.RMI_SERVER_PREFIX + serverId;
         registry.unbind(name);
         log.info("unregistered " + name + " from registry");

         name = RMITestServer.NAMING_SERVER_PREFIX + serverId;
         registry.unbind(name);
         log.info("unregistered " + name + " from registry");
View Full Code Here

         String name = RMITestServer.RMI_SERVER_PREFIX + serverId;
         registry.unbind(name);
         log.info("unregistered " + name + " from registry");

         name = RMITestServer.NAMING_SERVER_PREFIX + serverId;
         registry.unbind(name);
         log.info("unregistered " + name + " from registry");

         log.info("#####");
         log.info("#####");
         log.info("##### Halting the server!");
View Full Code Here

        log.info("Exitting");
        backingEngine.exit();
        // Tidy up any objects we created
        Registry reg = LocateRegistry.getRegistry(this.rmiPort);       
        try {
            reg.unbind(JMETER_ENGINE_RMI_NAME);
        } catch (NotBoundException e) {
            log.warn(JMETER_ENGINE_RMI_NAME+" is not bound",e);
        }
        log.info("Unbound from registry");
        // Help with garbage control
View Full Code Here

  public boolean bg_stop() {
    System.err.println("Stopping Server: "+this.portName);
    try {
      Registry registry=LocateRegistry.getRegistry();
      registry.unbind(this.portName);
      return UnicastRemoteObject.unexportObject(this,true);
    } catch(Exception e) {
      System.err.println("Server stop exception: "+e.toString());
      e.printStackTrace();
      return false;
View Full Code Here

    @Override
    protected void doStop() throws Exception {
        super.doStop();
        try {
            Registry registry = endpoint.getRegistry();
            registry.unbind(endpoint.getName());
        } catch (Throwable e) { // do our best to unregister
        }
        UnicastRemoteObject.unexportObject(proxy, true);
    }
View Full Code Here

      {
         try
         {
            log.debug("unbinding " + "remoting/RMIServerInvoker/" + locator.getPort() + " from registry running on port " + (locator.getPort() + 1));
            Registry registry = getRegistry();
            registry.unbind("remoting/RMIServerInvoker/" + locator.getPort());
         }
         catch(Exception e)
         {
            log.error("Error unbinding RMIServerInvoker from RMI registry.", e);
         }
View Full Code Here

    @Override
    protected void doStop() throws Exception {
        super.doStop();
        try {
            Registry registry = endpoint.getRegistry();
            registry.unbind(endpoint.getName());
        } catch (Throwable e) { // do our best to unregister
        }
        UnicastRemoteObject.unexportObject(proxy, true);
    }
View Full Code Here

            registry = rmiRegistries.get(Integer.toString(port));
            if (registry == null) {
                registry = LocateRegistry.getRegistry(port);
                rmiRegistries.put(Integer.toString(port), registry);
            }
            registry.unbind(serviceName);
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
            rmiExec.setStackTrace(e.getStackTrace());
            throw rmiExec;
        } catch (NotBoundException e) {
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.