Hello everyone,
I'm trying to lookup a DataSource using JNDI configured within Tomcat (I'm
not using JBoss) from an application that isn't in the container (i.e. a
console app).
1. Is Tomcat's JNDI available to application outside of the container?
2. If so what are the properties that I would need to set in order to get an
initial context?
Here are my uninformed guesses:
Properties props = new Properties();
//props.put("java.naming.factory.initial","com.sun.jndi.rmi.registry.Registr
yContextFactory");
//props.put("java.naming.factory.initial",
"org.apache.naming.java.javaURLContextFactory");
//props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextF
actory");
//props.put("java.naming.provider.url","rmi://localhost:1099");
//props.put("java.naming.provider.url","localhost:1099");
//props.put("java.naming.provider.url","jnp://localhost:1099");
InitialContext context = new InitialContext(props);
James Dunwoody
Software Engineer
Sytec Resources Limited
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]