-
1. Re: Please help. Unable to run first example.
pschwein Feb 21, 2002 5:59 AM (in response to vpalasi)Are you running the client example or tring to get to it from tomcat?
Try addding the following to the code:
Properties jBossProperties = new Properties();
jBossProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
jBossProperties.put(Context.PROVIDER_URL, "localhost:1099");
jBossProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
jndiContext = new InitialContext(jBossProperties);
I pasted this from a number of different places, so bare with it not compiling.
If you are running something for out side the jboss jvm, you need to specifiy the which jndi tree you want to lookup.
Normally this is done in the jndi.properties, but this will work as well. -
2. Re: Please help. Unable to run first example.
pschwein Feb 21, 2002 6:08 AM (in response to vpalasi)Are you running the client example or tring to get to it from tomcat?
Try addding the following to the code:
Properties jBossProperties = new Properties();
jBossProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
jBossProperties.put(Context.PROVIDER_URL, "localhost:1099");
jBossProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
jndiContext = new InitialContext(jBossProperties);
I pasted this from a number of different places, so bare with it not compiling.
If you are running something for out side the jboss jvm, you need to specifiy the which jndi tree you want to lookup.
Normally this is done in the jndi.properties, but this will work as well.