Package java.rmi.registry

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


    private CalculatorService calculatorService;

    protected void setUp() throws Exception {
        CalculatorRMIServiceImpl rmiCalculatorImpl = new CalculatorRMIServiceImpl();
        Registry rmiRegistry = LocateRegistry.createRegistry(8099);
        rmiRegistry.bind("CalculatorRMIService", rmiCalculatorImpl);
       
        scaDomain = SCADomain.newInstance("CalculatorRMIReference.composite");
        calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
    }
   
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

                } catch (RemoteException e) {
                    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());
            rmiExec.setStackTrace(e.getStackTrace());
View Full Code Here

        this.peers = new ArrayList<Peer>();
        this.randomGenerator = new Random();
        // The tracker is a remotely accessible object: bind it to an RMI
        // registry so that we can retrieve it at a well known address
        Registry registry = LocateRegistry.createRegistry(port);
        registry.bind("tracker", this);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

            try {
                // check whether we have a private registry already
                Registry registry = RmiRegistrationSupport.this.getPrivateRegistry();
                if (registry != null) {
                    registry.bind(rmiName, this.rmiRepository);
                    this.rmiName = rmiName;
                    RmiRegistrationSupport.this.log(LogService.LOG_INFO,
                        "Repository bound to " + this.getRmiURL(), null);
                }
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

        public Void call()
            throws RemoteException {
          Registry registry = LocateRegistry.createRegistry(port);
          stub = (RemoteCSPokerServer) UnicastRemoteObject.exportObject(RMIServer.this, 0);
          try {
            registry.bind("CSPokerServer", stub);
          } catch (AlreadyBoundException exception) {
            throw new IllegalStateException(exception);
          }
          logger.info("Started RMI server at port " + port);
          return null;
View Full Code Here

            } catch (RemoteException re) {
                if(debug) System.out.println("Naming.rebind("+ proxyAddress +", eventProxy): " + re);
                try {
                    eventProxy = new EventListenerProxy();
                    Registry r = LocateRegistry.createRegistry(portnum);
                    r.bind(rmiName, eventProxy);
                    if(debug) System.out.println(rmiName + " bound to newly created registry at port " + portnum );
                } catch(Exception e) {
                    eventProxy = null;
                    if(debug) e.printStackTrace();
                }
View Full Code Here

      jobServer = new JobServer(jobsDirectory, factory, scheduler, classManager, executor);
      AuthenticationServer authServer = new AuthenticationServer(jobServer, JdcpUtil.DEFAULT_PORT);

      logger.info("Binding service");
      Registry registry = getRegistry();
      registry.bind("AuthenticationService", authServer);

      logger.info("Server ready");
      System.out.println("Server started");

    } catch (Exception e) {
View Full Code Here

      jobHub = new JobHub(ds);
      AuthenticationServer authServer = new AuthenticationServer(jobHub, JdcpUtil.DEFAULT_PORT);

      logger.info("Binding service");
      Registry registry = getRegistry();
      registry.bind("AuthenticationService", authServer);

      logger.info("Hub ready");
      System.out.println("Hub started");

    } catch (Exception 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.