You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tim Patton <tp...@dealcatcher.com> on 2005/11/16 17:55:12 UTC
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 I
have a pool of connections that have sat idle for hours; the server has most
likely shut them down by now. When I execute an update I get
"java.sql.SQLException: I/O Error: Connection reset by peer: socket write
error". However, it is my understanding that before returning a connection,
the pool should run the validation query and make sure it still works. This
does not seem to be the case. Is there any way to guarantee this runs? I
have set the validation query to a working, non null value, and I always get
a new connection when executing any SQL, as well as always closing the
connection when I am done.
Tim