1 Reply Latest reply on Nov 27, 2007 2:48 AM by jaikiran pai

    a stange problem with JNP

    Reggie Zhou Newbie

      my code is
      env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      env.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
      or
      env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
      it's working well. everything is fine.

      but if i change it to
      env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      env.put(Context.PROVIDER_URL, "jnp://192.168.1.101:1099");
      an error came out
      javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.1.101:1099

      localhost, 127.0.0.1, 192.168.1.101 is the same server.
      actually i wanna connect to a remote server 192.168.1.50. but i can't even connect to myself if i use 192.168.1.101 address
      does anybody have any idea what's going on?