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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to