This question seems to have been asked about a thousand times: I apologize for bringing it up again. I was unable to find a solution that worked from among prior responses. I want to configure Tomcat's InitialContext with Jboss' JNDI info. Life is good as long as I do things in code: Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); env.put("java.naming.provider.url", "freud:1099"); Context context = new InitialContext(env);
However, I obviously would like to put this in a jndi.properties file, or externalize it in some other way. I've tried putting the jndi.properties file in the following locations: $JAVA_HOME/lib $JAVA_HOME/lib/ext $TOMCAT_HOME/common/classes $TOMCAT_HOME/common/shared $TOMCAT_HOME/webapps/myapp/WEB-INF/classes $TOMCAT_HOME/webapps/myapp/WEB-INF/lib Nothing works: when I check system properties just before creating an InitialContext, I get the following output: java.naming.factory.initial is org.apache.naming.java.javaURLContextFactory java.naming.factory.url.pkgs is org.apache.naming java.naming.provider.url is null Followed by the inevitable exception: javax.naming.NameNotFoundException: Name PartnerManager is not bound in this Context How can I externalize these system properties? I've also mucked with the server.xml file quite extensively, without success. I'm using Redhat 8.0, JDK1.4.1, and Tomcat 4.1.12. Thanks! Rod