You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by luke cassady-dorion <lu...@netraker.com> on 2003/06/04 19:32:10 UTC

refreshing a connection

A requirement for my application is that the application can continue to
service requests even if the database connection is severed. In order to
do this, i'm putting insert requests into a queue and pushing them back
on if they fail. What i'm finding tho is that the if the db is started
and stopped that the ojb connection pool does not refresh itself nor can
i force the pool to replace the connection with a new one. Am i missing
something?

I'm using mssql server if that matters. 


Re: refreshing a connection

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi,

use 'validationQuery' in your jdbc-connection-descriptor.
Then OJB do a 'real' query before a connection was returned.
This is a minor performance impact, but this should solve your
problem.

regards,
Armin

----- Original Message -----
From: "luke cassady-dorion" <lu...@netraker.com>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Wednesday, June 04, 2003 7:32 PM
Subject: refreshing a connection


> A requirement for my application is that the application can continue
to
> service requests even if the database connection is severed. In order
to
> do this, i'm putting insert requests into a queue and pushing them
back
> on if they fail. What i'm finding tho is that the if the db is started
> and stopped that the ojb connection pool does not refresh itself nor
can
> i force the pool to replace the connection with a new one. Am i
missing
> something?
>
> I'm using mssql server if that matters.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>