commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <>
Subject Re: [DBCP] Testing of connections
Date Tue, 24 Jun 2003 16:20:46 GMT
There actually has just been some recent discussion on how to handle 
this better.

For now, you can add a SQL statement to verify the connection after each 

Serge Knystautas
Lokitech >> software . strategy . design >>
p. 301.656.5501

Johannes Lietz wrote:

> I've got the following problem:
> I'm using DBCP from inside Tomcat to connect to a database. Between 
> Tomcat and database server is a firewall.
> And this firewall is causing problems: when a database connection is 
> idle for some time, the firewall will block this connection, and not 
> drop the connection.
> Therefore DBCP thinks the connection is still open and alive and tries 
> to use it. And as the connection is blocked, DBCP will wait eternally 
> until something happens.
> My question: Is there any way to configure DBCP to test connections 
> regularly and refresh them if necessary? Or to set a timeout when a 
> connection is declared dead and dropped?

View raw message