Thanks for the answer...worked the way I wanted it to for my immediate
problem in production.

Not keen on the fact that I know have a ton of extra SQL calls--but I guess
that is the price I pay right now! :)

Thanks again!

-Andrew

-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 11:30 AM
To: OJB Users List
Subject: Re: Connection failed if DB restarted?


Hi Andrew,

you can use the 'validationQuery' attribute of connection-pool element to
specify a validation query. This query will be executed each time before a
connection was delivered by the pool.

Any proposals to make this more sophisticated are
welcome.

regards,
Armin

On Fri, 17 Oct 2003 11:20:02 -0400, Clute, Andrew 
<[EMAIL PROTECTED]> wrote:

> I apologized in advance for the increase in mail traffic today. I have 
> checked the archives for an answer to this, to no avail.
>
> I am seeing, as expected, if our Database has been restarted that any 
> db connections in the pool as becoming invalid. I understand how this 
> is happening -- the connection doesn't realize the socket connection 
> has been reset, and so it fails to persist any data. I have simulated 
> the situation,
> and I can see the connection when it is retrieved from the pool is still
> marked as active.
>
> I am using ConnectionFactoryPooledImpl. What seems odd to me, is it 
> never self-corrects. It looks to me like when the connection failed, 
> it is still in the pool, and I never get a valid connection.
>
> OJB is being used by EJB's sitting in Jboss. I am not using OJB as a 
> deployed EJB, but calling directly. I am also not using a DataSource 
> inside of Jboss, but instead the connection pool from OJB.
>
> It seems to me using the pooled connections, that when the database is 
> restarted, then I have to take down my Jboss server and restart it to 
> refresh the pool. Am I missing something here? Now, I could use no 
> pool, and then the problem never arises. Would using the DataSource 
> from jBoss and ConnectionFactoryManagedImpl make it better.
>
> What should me expectations be for db connections when the database 
> has
> been
> restarted? (Bigger issue here is our SQL Server cluster -- all the
> connections become invalid when the server fails over to a different
> server).
>
> -Andrew
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to