This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to register a db2 datasource in tomcat 5.5.4. However I get null when I do context.lookup in my java code.
This is what i have done
<GlobalNamingResources> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
Correct me if I'm wrong, but can't you use Tomcat's admin login tool to view a list of all data sources? After you have found it in the list, it should have the precise JNDI string that will load the application.