Package java.rmi.registry

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


            // if we finally have a registry, register the repository with the
            // rmiName
            if (reg != null) {
                log.debug("Registering repository as " + rc.getRmiName()
                        + " to registry " + reg);
                reg.bind(rc.getRmiName(), remote);

                // when successfull, keep references
                this.rmiRepository = remote;
                log.info("Repository bound via RMI with name: " + rc.getRmiUri());
            } else {
View Full Code Here


            // if we finally have a registry, register the repository with the
            // rmiName
            if (reg != null) {
                log.debug("Registering repository as " + rc.getRmiName()
                        + " to registry " + reg);
                reg.bind(rc.getRmiName(), remote);

                // when successfull, keep references
                this.rmiRepository = remote;
                log.info("Repository bound via RMI with name: " + rc.getRmiUri());
            } else {
View Full Code Here

            // if we finally have a registry, register the repository with the
            // rmiName
            if (reg != null) {
                log.debug("Registering repository as " + rc.getRmiName()
                        + " to registry " + reg);
                reg.bind(rc.getRmiName(), remote);

                // when successfull, keep references
                this.rmiRepository = remote;
                log.info("Repository bound via RMI with name: " + rc.getRmiUri());
            } else {
View Full Code Here

    logger.info("INICIANDO JOKENPO SERVER");
    JokenpoServerImpl server = JokenpoServerImpl.newInstance();
    JokenpoServer stub = (JokenpoServer) UnicastRemoteObject.exportObject(server, 0);

    Registry registry = LocateRegistry.createRegistry(1099);
    registry.bind("stub", stub);

    logger.info("JOKENPO SERVER INICIADO");
  }

  @Override
View Full Code Here

            // if we finally have a registry, register the repository with the
            // rmiName
            if (reg != null) {
                log.debug("Registering repository as " + rc.getRmiName()
                        + " to registry " + reg);
                reg.bind(rc.getRmiName(), remote);

                // when successfull, keep references
                this.rmiRepository = remote;
                log.info("Repository bound via RMI with name: " + rc.getRmiUri());
            } else {
View Full Code Here

        stub = UnicastRemoteObject.exportObject(proxy, endpoint.getPort());

        try {
            Registry registry = endpoint.getRegistry();
            String name = endpoint.getName();
            registry.bind(name, stub);

        } catch (Exception e) {
            // Registration might fail.. clean up..
            try {
                UnicastRemoteObject.unexportObject(stub, true);
View Full Code Here

                } catch (RemoteException e) {
                    registry = LocateRegistry.getRegistry(null, rmiURI.port, socketFactory);
                }
                rmiRegistries.put(Integer.toString(rmiURI.port), registry);
            }
            registry.bind(rmiURI.serviceName, serviceObject);
            logger.info("RMI service registered: " + rmiURI);
            return rmiURI.toString();
        } catch (AlreadyBoundException e) {
            throw new RMIHostException(e);
        } catch (RemoteException e) {
View Full Code Here

            // if we finally have a registry, register the repository with the
            // rmiName
            if (reg != null) {
                log.debug("Registering repository as " + rc.getRmiName()
                        + " to registry " + reg);
                reg.bind(rc.getRmiName(), remote);

                // when successfull, keep references
                this.rmiRepository = remote;
                log.info("Repository bound via RMI with name: " + rc.getRmiUri());
            } else {
View Full Code Here

            if (registry == null) {
                registry = LocateRegistry.createRegistry(port);
                rmiRegistries.put(Integer.toString(port),
                                  registry);
            }
            registry.bind(serviceName,
                          serviceObject);
        } catch (AlreadyBoundException e) {
            throw new RMIHostException(e.getMessage());
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
View Full Code Here

            if (registry == null) {
                registry = LocateRegistry.createRegistry(port);
                rmiRegistries.put(Integer.toString(port),
                    registry);
            }
            registry.bind(serviceName,
                serviceObject);
        } catch (AlreadyBoundException e) {
            throw new RMIHostException(e);
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
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.