0 Replies Latest reply on Oct 3, 2007 3:25 AM by Hari Sundharesan

    JNDI lookup across partitions and local

    Hari Sundharesan Newbie

      I use a servicelocator which is a generic class which will return to me a remote stub based on the ejb requested with a jndi name. so i have about 3 different ejbs providing different services running in a cluster. now one of the ejb runs in a totally different partition. I do the lookup using

      Properties p = new Properties();
      p.put("jnp.partitionName", "IndicsPartition"); //indicspartition is my partition name
      p.put("jnp.discoveryGroup", "");
      Context initial = new InitialContext(p);

      the other ejb's are deployed locally or in the same cluster. for the local or remote lookup in a cluster we already have
      Properties p = new Properties();
      p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port
      initial = new InitialContext(p);

      Do i need to have these both as different cases and try each or can i have one context which will be able to load it from IndicsPartition if available or from teh local cluster if availbale ?