[jboss-user] [JNDI/Naming/Network] - a stange problem with JNP

su27 do-not-reply at jboss.com
Tue Nov 27 00:32:49 EST 2007


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107934#4107934

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107934



More information about the jboss-user mailing list