commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodney Waldhoff <>
Subject Re: [DBCP] Testing of connections
Date Wed, 25 Jun 2003 13:37:23 GMT
On Wed, 25 Jun 2003, Serge Knystautas wrote:

> Yes, the current release has only one validation query spot, which as
> you say is during testOnBorrow.

No.  The current release, indeed the initial import of the source into
commons, has one validation query and three places it can be used,
independently or in combination.  There are 8 possible combinations
available--on borrow, on return, when idle, each independently on or off.

> This will still cause your firewall to kill connections, and then DBCP
> will validate the connection, find it's bad, and get a good connection
> for your app.  (For me this is preferrable to keeping idle connections
> open just because of a periodic validation check.)

Independent of the validation/keep-alive query, you can tell the pool to
evict connections that have been idle for too long.  Set
minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis.

- Rod <>

> --
> Serge Knystautas
> President
> Lokitech >> software . strategy . design >>
> p. 301.656.5501
> e.

View raw message