Package java.rmi.registry

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


            if(!testStubReturn.equals(obj.hello)) {
                throw new RuntimeException("Test Fails : unexpected string from stub call");
            } else {
                System.out.println("Test passed");
            }
            registry.unbind("Hello");
           
        } catch (Exception e) {
            System.err.println("Server exception: " + e.toString());
            e.printStackTrace();
        }
View Full Code Here


        Registry stub = (Registry) RemoteObject.toStub(impl);
        stub.bind("", stub);
        stub.lookup("");
        stub.rebind("", stub);
        stub.lookup("");
        stub.unbind("");
    }
}
View Full Code Here

            throw new RuntimeException("TEST FAILED: wrong operation number");
        }

        System.err.println("invoking unbind:");
        try {
            testStub.unbind(NAME);
        } catch (UnsupportedOperationException e) {
        }
        System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
        if (f.hash != 4905912898345647071L) {
            throw new RuntimeException("TEST FAILED: wrong interface hash");
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

            // 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.unbind(url.name);
    }

    public static void bind(String name, Remote obj) throws AlreadyBoundException,
            MalformedURLException, RemoteException {
        if (obj == null) {
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

      {
         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

         // 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");
  
         // unregister myself from the RMI registry
  
         name = NAMING_SERVER_PREFIX + server.getServerID();
View Full Code Here

         log.info("unregistered " + name + " from registry");
  
         // unregister myself from the RMI registry
  
         name = NAMING_SERVER_PREFIX + server.getServerID();
         registry.unbind(name);
         log.info("unregistered " + name + " from registry");
  
      }
      catch (Exception e)
      {
View Full Code Here

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

        String bindName = resources.getRMIBindName();
       
        try {
            registry.unbind(bindName);
            UnicastRemoteObject.unexportObject(this, true);
        } catch (java.rmi.NotBoundException nbe) {
        }

        getLog().info("Scheduler un-bound from name '" + bindName + "' in RMI registry");
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.