Package net.jini.lookup

Examples of net.jini.lookup.ServiceDiscoveryManager.lookup()


        LookupDiscoveryManager(spaceGroups, locators, null);
      ServiceDiscoveryManager serviceDiscoveryManager = new
        ServiceDiscoveryManager(discovery, null);
      System.out.print("...");
      st = new ServiceTemplate(null, spaceClss, spaceEntries);
      si = serviceDiscoveryManager.lookup(st, null,
                                          10 * 1000);
      if(si != null && si.service != null) {
        space = (JavaSpace) si.service;
        si = null;
        System.out.print("...");
View Full Code Here


        throw
          new RMServerException("JobRepository not found");
      }
      discovery.setGroups(txnGroups);
      st = new ServiceTemplate(txnID, txnClss, txnEntries);
      si = serviceDiscoveryManager.lookup(st, null,
                                          10 * 1000);
      if(si != null && si.service != null) {
        txnMgr = (TransactionManager) si.service;
        si = null;
        System.out.print("...");
View Full Code Here

    LookupDiscovery discovery = new
      LookupDiscovery(LookupDiscovery.NO_GROUPS);
    discovery.addGroups(spaceGroups);
    ServiceDiscoveryManager serviceDiscoveryManager = new
      ServiceDiscoveryManager(discovery, null);
    si = serviceDiscoveryManager.lookup(spaceTempl, null,
                                        30 * 1000);
    if(si != null && si.service != null) {
      space = (JavaSpace) si.service;
      si = null;
      System.out.println("JobRepository found");
View Full Code Here

      System.out.println("JobRepository found");
    } else {
      System.out.println("Can't find JobRepository");
    }
    discovery.setGroups(txnGroups);
    si = serviceDiscoveryManager.lookup(spaceTempl, null,
                                        30 * 1000);
    if(si != null && si.service != null) {
      txnMgr = (TransactionManager) si.service;
      si = null;
      System.out.println("TransactionManager found");
View Full Code Here

        /* Create the filter to pass to the SDM for proxy preparation */
        ServiceItemFilter filter = new ProxyPreparerFilter(preparer);

  /* Look up the remote server (SDM performs proxy preparation) */
  ServiceItem serviceItem = serviceDiscovery.lookup(
      new ServiceTemplate(null, new Class[] { Hello.class }, null),
      filter, Long.MAX_VALUE);
  Hello server = (Hello) serviceItem.service;

  /* Use the server */
 
View Full Code Here

                                           null);
        System.out.println("Discovering Hello service ...");
        ServiceDiscoveryManager sdm =
                new ServiceDiscoveryManager(ldm, new LeaseRenewalManager());
        /* Wait no more then 10 seconds to discover the service */
        ServiceItem item = sdm.lookup(tmpl, null, 10000);
        if(item != null) {
            System.out.println("Discovered Hello service");
            Hello hello = (Hello)item.service;
            System.out.println("Invoking Hello service ...");
            String ret = hello.hello("Hello from Client");
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.