Package java.rmi.registry

Examples of java.rmi.registry.Registry


  {
    if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }
        Bank stub =(Bank)UnicastRemoteObject.exportObject(this, 0);
        Registry registry = LocateRegistry.getRegistry();
        registry.rebind(bankName, stub);
  }
View Full Code Here


  }
 
  public void unbind()
  {
    try {
      Registry registry;
      registry = LocateRegistry.getRegistry();
      registry.unbind(bankName);
    } catch (AccessException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (RemoteException e) {
      // TODO Auto-generated catch block
View Full Code Here

     
      try
      {    
        bankImpl = new BankImpl("TestBank");
        Naming.rebind("TestBank", bankImpl);
        Registry registry = LocateRegistry.getRegistry();
      }   
      catch (MalformedURLException ex)
      {     
        System.out.println(ex.getMessage());   
      }   
View Full Code Here

                        }
            });
       
        DefaultPicoContainer pico = new DefaultPicoContainer();
        pico.registerComponent(componentAdapter).verify(pico);
        Registry registry = (Registry)pico.getComponentInstance(Registry.class);
        assertNotNull(registry);
    }
View Full Code Here

    private static void shutdown(Configuration config) throws Exception {
  String host = (String) config.getEntry(PHOENIX, "registryHost",
                 String.class, null);
  int port = getInt(config, "registryPort",
        ActivationSystem.SYSTEM_PORT);
  Registry reg = LocateRegistry.getRegistry(host, port);
  ActivationSystem sys =
      (ActivationSystem) reg.lookup(ActivationSystem.class.getName());
  ProxyPreparer sysPreparer = getPreparer(config, "systemPreparer");
  sys = (ActivationSystem) sysPreparer.prepareProxy(sys);
  sys.shutdown();
    }
View Full Code Here

    try {
      thread.setContextClassLoader(ClassLoader.getSystemClassLoader());

      try {
        Registry reg = LocateRegistry.getRegistry(_port);
        reg.list()// Verify it's alive and well
        if (log.isLoggable(Level.CONFIG))
          log.config(L.l("found RMI Registry on port `{0}'",
                         _port));
      }
      catch (Exception e) {
View Full Code Here

        if (name == null) {
            // rmi.00=URL could not be null.
            throw new NullPointerException(Messages.getString("rmi.00")); //$NON-NLS-1$
        }
        RegistryURL url = getRegistryURL(name, true);
        Registry reg = LocateRegistry.getRegistry(url.host, url.port);
        String[] names = reg.list();
        String regName = "//" + ((url.host == null) ? "" : url.host) + ":" + url.port + "/"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

        for (int i = 0; i < names.length; ++i) {
            names[i] = regName + names[i];
        }
View Full Code Here

        if (name == null) {
            // rmi.00=URL could not be null.
            throw new NullPointerException(Messages.getString("rmi.00")); //$NON-NLS-1$
        }
        RegistryURL url = getRegistryURL(name, false);
        Registry reg = LocateRegistry.getRegistry(url.host, url.port);
        reg.rebind(url.name, obj);
    }
View Full Code Here

        if (name == null) {
            // rmi.00=URL could not be null.
            throw new NullPointerException(Messages.getString("rmi.00")); //$NON-NLS-1$
        }
        RegistryURL url = getRegistryURL(name, false);
        Registry reg = LocateRegistry.getRegistry(url.host, url.port);
        reg.unbind(url.name);
    }
View Full Code Here

        if (name == null) {
            // rmi.00=URL could not be null.
            throw new NullPointerException(Messages.getString("rmi.00")); //$NON-NLS-1$
        }
        RegistryURL url = getRegistryURL(name, false);
        Registry reg = LocateRegistry.getRegistry(url.host, url.port);
        reg.bind(url.name, obj);
    }
View Full Code Here

TOP

Related Classes of java.rmi.registry.Registry

Copyright © 2018 www.massapicom. 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.