commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <>
Subject Re: DBCP tracking stale connections?
Date Mon, 09 Dec 2002 13:08:36 GMT
Tim Funk wrote:
> DBCP can close connections if they have been opened to long by a client. 
> The close check is issued only when another request to obtain a 
> connection is made.
> As for testing for stale connections - there is a parameter when DBCP 
> pools are created that allow you to specify a query to check a 
> connections health. If the query fails  - then the connection is 
> considered bad and DBCP will discard the connection and open a new one.

Hi Tim,

Unfortunatelly, it doesn't work for BasicDataSource, which may have been 
used by Tomcat internally, but only for Jdbc2PoolDS, which I haven't yet 
gave it a try. According to javadoc, moving from BasicDS to Jdbc2PoolDS 
should not incur any problems.

Anyone's tested DBCP in this regard ?


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

View raw message