commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: [dbcp] invalid connections
Date Sat, 15 Mar 2003 06:08:46 GMT

On Fri, 14 Mar 2003, Robert McIntosh wrote:

> Date: Fri, 14 Mar 2003 21:19:28 -0600
> From: Robert McIntosh <>
> Reply-To: Jakarta Commons Developers List <>
> To: Commons <>
> Subject: [dbcp] invalid connections
> Is there a way to force, or configure, dbcp to either validate the
> connections it has open, or reestablish them? The problem is that if a
> network error occurs or the db is stoped and restarted, the connections
> in the pool are working correctly, as they well, lose their connection.
> Any thoughts?

This totally depends on what DBCP implementation you are using.  If you're
using BasicDataSource (for example), this is what the "validationQuery"
property is for.  If you are rolling your own DBCP implementation, then it
is up to you to set an appropriate "testOnBorrow" property on the
underlying pool implementation.

> thanks,
> ~Robert


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

View raw message