Package java.rmi.registry

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


      // try to bind first
      try
      {
         registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT);
         registry.bind(RMI_SERVER_PREFIX + serverIndex, testServer);
         registry.bind(NAMING_SERVER_PREFIX + serverIndex, testServer.getNamingDelegate());

      }
      catch(Exception e)
      {
View Full Code Here


      // try to bind first
      try
      {
         registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT);
         registry.bind(RMI_SERVER_PREFIX + serverIndex, testServer);
         registry.bind(NAMING_SERVER_PREFIX + serverIndex, testServer.getNamingDelegate());

      }
      catch(Exception e)
      {
         log.info("Failure using an existing registry, trying creating it");
View Full Code Here

         log.info("Failure using an existing registry, trying creating it");

         // try to create it
         registry = LocateRegistry.createRegistry(DEFAULT_REGISTRY_PORT);

         registry.bind(RMI_SERVER_PREFIX + serverIndex, testServer);
         registry.bind(NAMING_SERVER_PREFIX + serverIndex, testServer.getNamingDelegate());
      }

      log.info("RMI server " + serverIndex + " bound");
   }
View Full Code Here

         // try to create it
         registry = LocateRegistry.createRegistry(DEFAULT_REGISTRY_PORT);

         registry.bind(RMI_SERVER_PREFIX + serverIndex, testServer);
         registry.bind(NAMING_SERVER_PREFIX + serverIndex, testServer.getNamingDelegate());
      }

      log.info("RMI server " + serverIndex + " bound");
   }
View Full Code Here

    void run() throws IOException, AlreadyBoundException, RemoteException
    {
        store = new SerialObjectStore();
        SRPRemoteServer server = new SRPRemoteServer(store);
        Registry reg = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
        reg.bind("SimpleSRPServer", server);
    }

    public static void main(String[] args) throws Exception
    {
        SRPServerImpl server = new SRPServerImpl();
View Full Code Here

        EagleLogin eagleLogin = (EagleLogin) UnicastRemoteObject.exportObject(loginHandler,remotePort);
        UnicastRemoteObject.exportObject(this,remotePort);

        Registry registry = LocateRegistry.createRegistry(remotePort);

        registry.bind("eagleLogin", eagleLogin);

      } catch (AccessException e) {

        log.fatal("Unable to start remote manangement interface, aborting startup!",e);
        return;
View Full Code Here

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

                // when successfull, keep references
                this.rmiURI = rmiURI;
                this.rmiRepository = remote;
                log.info("Repository bound via RMI with name: " + rmiURI);
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

            }
        };

        // Create server notified by the filter
        final Registry registry = LocateRegistry.createRegistry(4001);
        registry.bind(RMIBroadcastService.class.getSimpleName() + "/RMITopic", service);

        // Create broadcaster
        final AtmosphereConfig config = new AtmosphereFramework().getAtmosphereConfig();
        final DefaultBroadcasterFactory factory = new DefaultBroadcasterFactoryForTest(DefaultBroadcaster.class, "NEVER", config);
        config.framework().setBroadcasterFactory(factory);
View Full Code Here

            }
            JGDIRemoteFactoryImpl service = new JGDIRemoteFactoryImpl(sge_url);
            Thread.sleep(1000);
            Remote stub = (Remote)UnicastRemoteObject.exportObject(service, 0);
           
            reg.bind(serviceName, stub);
           
            logger.info("JGDIRemoteFactory bound to name " + serviceName );
           
            ShutdownHook shutdownHook = new ShutdownHook(reg, serviceName);
            Runtime.getRuntime().addShutdownHook(shutdownHook);
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.