commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Patton" <>
Subject RE: DBCP: validationQuery Problems
Date Wed, 16 Nov 2005 17:11:42 GMT
Thanks for the link, should that be mentioned in the DBCP docs somewhere?
That seems to be an important omission.


-----Original Message-----
From: Sitowitz, Paul [] 
Sent: Wednesday, November 16, 2005 12:05 PM
To: Jakarta Commons Users List
Subject: RE: DBCP: validationQuery Problems


In addition to setting the validation query, you will ALSO need to
configure the pool to perform "validate on return". You can configure
validation to occur upon borrowing connections, returning connections,
and during the time when connections sit idle in the pool.

Check out the online JavaDocs for GenericObjectPool and
GenericKeyedObjectPool for more of the details and specifics:


-----Original Message-----
From: Tim Patton [] 
Sent: Wednesday, November 16, 2005 11:55 AM
Subject: DBCP: validationQuery Problems

I'm using DBCP with the JTDS SQL driver.  I seem to be having a problem
where the validation query is not always running (I assume).  Basically
have a pool of connections that have sat idle for hours; the server has
likely shut them down by now.  When I execute an update I get
"java.sql.SQLException: I/O Error: Connection reset by peer: socket
error".  However, it is my understanding that before returning a
the pool should run the validation query and make sure it still works.
does not seem to be the case.  Is there any way to guarantee this runs?
have set the validation query to a working, non null value, and I always
a new connection when executing any SQL, as well as always closing the
connection when I am done.



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

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

View raw message