Package java.rmi.registry

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


            Registry registry = rmiRegistries.get(Integer.toString(rmiURI.port));
            if (registry == null) {
                registry = LocateRegistry.getRegistry(rmiURI.port);
                rmiRegistries.put(Integer.toString(rmiURI.port), registry);
            }
            registry.unbind(rmiURI.serviceName);
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
            rmiExec.setStackTrace(e.getStackTrace());
            throw rmiExec;
        } catch (NotBoundException e) {
View Full Code Here


  public void unbind(String name) throws NamingException {
    checkName(name);
    Registry registry = getRegistry();
    try {
      registry.unbind(toRMIName(name));
    } catch (NotBoundException ex) {
      throw new NameNotFoundException(name + " not found in RMI registry " + registry);
    } catch (RemoteException ex) {
      throw new NamingException("Remote exception: " + ex.getMessage());
    }
View Full Code Here

        rmiRegistry.bind(serviceName, smsGatewayImpl);

        System.out.println("RMI server running - waiting for requests");
        System.out.println("Press enter to shutdown.");
        System.in.read();
        rmiRegistry.unbind(serviceName);
        System.exit(0);
    }
}
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

            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

        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

        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

            Registry registry = rmiRegistries.get(Integer.toString(rmiURI.port));
            if (registry == null) {
                registry = LocateRegistry.getRegistry(null, rmiURI.port, socketFactory);
                rmiRegistries.put(Integer.toString(rmiURI.port), registry);
            }
            registry.unbind(rmiURI.serviceName);
            logger.info("RMI service unregistered: " + rmiURI);
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
            rmiExec.setStackTrace(e.getStackTrace());
            throw rmiExec;
View Full Code Here

            if (registry == null) {
                registry = LocateRegistry.createRegistry(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

            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.