commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: recreation of connections in the dbcp
Date Thu, 22 May 2008 10:42:59 GMT
I'd use a validation query.  I believe that will solve your problem.
That way, the pool implementation can check to see that the connection
is "valid" before handing it off to you.  For HSQLDB, I use:

select 1 from INFORMATION_SCHEMA.SYSTEM_USERS

You can come up with something similar for other database products.
Hope that helps!

On Thu, May 22, 2008 at 4:43 AM,  <sed.nivo@gmail.com> wrote:
> Hello,
>
> I use database connection pool BasicDataSource for manegment of DB
> connections. When DB Server is restarted all connections are loosed.
> How can I handle this situation? Should I create new BasicDataSource
> or invoke some method.
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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


Mime
View raw message