This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Database Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "Database Connection Pooling" Watch "Database Connection Pooling" New topic

Database Connection Pooling

Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Does Tomcat provide database connection pooling.
If so can someone post me a link to an example of how to set it up.
Does it use data sources and JNDI to obtain a reference to the connection pool?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17023

Tomcat doesn't provide database anything.
However, it's not such a big deal to setup connection pools using JDBC and do your own.
Struts DOES provide some basic (and extensible) support for connection pooling. It's one of the topics covered in the sample app for this article:
The sample app itself is running on a Tomcat server
at and is annotated so you can see the components at work (hint: look at the struts-config.xml files and the "" files.

Customer surveys are for companies who didn't pay proper attention to begin with.
Michael Jaeger

Joined: Apr 11, 2002
Posts: 5
Well, in fact, Tomcat does provide connection pooling.
See here
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Database Connection Pooling
jQuery in Action, 3rd edition