File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes DataSource Pool configuration question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DataSource Pool configuration question" Watch "DataSource Pool configuration question" New topic

DataSource Pool configuration question

Chris Whited

Joined: Oct 19, 2012
Posts: 24

For a JDBC DataSource Pool, should I set up the <resource> element in the server.xml file? Or in a created context.xml file under the META-INF folder?

Per the O'Reilly Servlet and JSP cookbookm, you should set up the <resource> and <resource-params> element in the server.xml file. Looking into it though, that book was released in 2004 and according to a few things I found online; since the release of Tomcat 5.5 you should create a context.xml under META-INF.

I am using Tomcat 7.0.3 as my container.
I agree. Here's the link:
subject: DataSource Pool configuration question
Similar Threads
Query in : JNDI look up of DataSource
Not Able to Deploy War Files in Tomcat 6
passing session values between two web application
DB connection pool per webapp if defined in context.xml?