Tuesday, May 4, 2010

Tomcat Database Connection Pool

I have been doing some development work on Tomcat and I am told that my connection pool is getting stale after a while. We will see if the following link , or this one, or something else about JNDI will help. Other ideas are to establish a cleanup/reaper schedule that will close connections in the pool, if they are inactive beyond a certain period.

Check validationQuery.

validationQuery="SELECT 1"

jdbc:mysql://hostname/mydb?autoReconnect=true

Connection Pooling

Connection Reaper class:

JBCD and DBUtils

IBM Discussion on Stale Connections

Handling a Stale Connection

To view the log, go to tomcat6\logs\catalina.out It has all the system.out.println() entries in it.

No comments:

Post a Comment

Top Level Statements in C#

C# Top-Level Statements vs. Main Method C# Top-Level Statements vs. Main Method In C# 9 and later, you can use ...