Package java.rmi.registry

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


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


        MyRemoteObject obj = new MyRemoteObject();
        System.err.println("Object: " + obj + " created and exported.");
        Registry reg = LocateRegistry.createRegistry(REGISTRY_PORT);
        exportedObjects.add(reg);
        System.err.println("Registry created.");
        reg.bind("MyRemoteObject", RemoteObject.toStub(obj));
        exportedObjects.add(obj);
        System.err.println("Object bound in the registry.");
    }

    /**
 
View Full Code Here

  public static void main(String[] args) {
    try {
      configureLogging(args);
      SerializableTest t = new SerializableTest();
      Registry r = LocateRegistry.createRegistry(REGISTRY_PORT);
      r.bind(NAME, t);
      SimSystem.report(Level.FINE, "waiting for connections ...");
    } catch (Exception e) {
      SimSystem.report(e);
      System.exit(ERR_COULD_NOT_START);
    }
View Full Code Here

    } catch (RemoteException e) {
      e.printStackTrace();
      return;
    }
    try {
      r.bind(MIGRATION_CONTROLLER, mc);
    } catch (RemoteException | AlreadyBoundException e) {
      e.printStackTrace();
      return;
    }
    System.out.println("Registry initiliazed");
View Full Code Here

    } catch (RemoteException e) {
      e.printStackTrace();
      fail("No exception expected");
    }
    try {
      r.bind(MIGRATION_CONTROLLER, mc);
    } catch (RemoteException | AlreadyBoundException e) {
      e.printStackTrace();
      fail("No exception expected");
    }
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

      collectorInstance = new RemoteCollectorImpl<T>();

      Registry registry;

      registry = LocateRegistry.createRegistry(port);
      registry.bind(rmiId, collectorInstance);
     
      registries.add(registry);
    } catch (RemoteException e) {
      e.printStackTrace();
    } catch (AlreadyBoundException 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

      // 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

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.