- Posted by: Nir Nir
- Posted on: December 14 2003 02:35 EST
I came across the following line of code inside a certain class.
env.put("java.naming.factory.initial", conf.getProperty("jndi.initial.context.factory", "weblogic.jndi.WLInitialContextFactory"));
The class is supposed to run as a part of a .jar file installed on a Weblogic server. What is the appropriate configuration that needs to be done if one wants to run it under a Tomcat web server?
If it is not possible in the manner mentioned above, how should this line of code be changed in order for it to run under the Tomcat server?
Any help would be appreciated.
The context factory for Tomcat is "org.apache.naming.java.javaURLContextFactory". Note, that server url should be "http://myserver" instead of Weblogic's "t3://blah-blah".
And remember, that the only standard things you can lookup in Tomcat that way would be a Datasource and UserTransaction.