I am having trouble using JNDI when two or more applications are deployed on Tomcat 6. Consider the following scenario: I have 2 webapps, where each web.xml contains one JNDI pa
BTW,
All you need is to put context.xml in your META-INF of WebContent directory inside war. The JNDI will be register automatically, and pool will be created on application load.
Only optionally, you can put it in /tomcat6/conf/context.xml, but this will require restart of tomcat after each configuration change.
Here is some good configuration for my sql. Important point is logAbandoned (to detect unclosed connections that were thrown out of pool by container, because your code forgot to close it). For validation query i suggest something to test your database table presence.