commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
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 <robert@bull-enterprises.com>
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: Commons <commons-dev@jakarta.apache.org>
> 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

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message