1 Reply Latest reply on Mar 24, 2008 10:08 PM by Kazuhisa Ichikawa

    JNDI look up in two different ways? whats the difference, ad

    Subrata Saha Newbie

      while sending message to queue by http

      we can populate context in two different ways?
      1) Properties p = new Properties();
      p.put(Context.PROVIDER_URL, "jnp://");
      ctx = new InitialContext(p);

      2) Properties p = new Properties();
      p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
      env.setProperty(Context.PROVIDER_URL, """);

      ctx = new InitialContext(p);

      How does it matter ????