tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <>
Subject Re: Database Pooling
Date Tue, 30 Aug 2005 17:20:50 GMT
MySQL shuts down the connections after 8 hours. Ran into this myself.

Yes, Tomcat has pooling built in.
Yes, it handles all aspects of the pool.

Try this link to start with:

It is directed more to the database pooling. There is also lots of entries 
in the archives.

Some people have no problem setting it up but there are a few that run into 
some configuration issues that seem to baffle them.

Some tips:
Watch the naming that both case and spelling match.
Put the drivers in common/lib
Use the latest drivers.
Make sure you have only one copy of the drivers.


----- Original Message ----- 
From: "Scott Purcell" <>
To: <>
Sent: Tuesday, August 30, 2005 1:08 PM
Subject: Database Pooling


To start off with, I hand rolled a database pooling class to handle database 
pooling for a ecommerce site I am writing. The application is web-based so 
of course I am using Tomcat 5.5 and all was going well. But in my 
implementation, I occasionally get errors when the connection has not been 
used for a long period of time. Basically mysql or tomcat may be taking 
themselves out of service and I get some errors through Tomcat.

Anyway, I got frustrated and began to look through some on-line docs in 
regards to Tomcat and DatabasePooling.

Which leads me to my question:
Is pooling build-in to Tomcat 5.5?
If so, how simple is this to implement (I have read here: 
but I an not familiar with JNDI.
And if it does it take care of shutting down the pool when the server gets 
reloaded or gets unloaded?

Currently my pooling solution is huge, with threads to monitor if they are 
closed, etc. I figure there has to be a better implementation, or solution 
for myself in this regards

Could anyone please help out with some sample, or explanation of how this 
all fits together.

I have created business objects, so I just need to call the database from 
business objects, not directly from tomcat.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message