commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <jacek_laskow...@hp.com>
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 ?

-Jacek


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message