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.

Martin van Dijken wrote:
Hey gang,
I know I should ask this question on users, but bear with me a second. Does DBCP track and terminate connections which have been idle so long that they are killed by the DBMS?
The reason I ask, is that after 8 hours of inactivity on a website(and thus DBconnections) mysql considers connections to be lost and kills them. After that the website fails to work. All connections throw IOExceptions telling me that no connection could be established.
Love to hear from ya,
Martin van Dijken


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to