You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by mischa <mi...@gmail.com> on 2005/11/18 12:54:40 UTC

Re: [Fwd: [Fwd: Re: connection pooling]]

what happens if the ping fails. does the connection getting removed from 
the pool?
the reason why i don't have pinging enabled is because i want to control 
the case when a connection is closed for one cluster on my own (so i can 
switch to another cluster). even if i could solve the problem by pinging 
the connection i still think it is bad that closed connections are 
getting put back into the pool (or not getting recycled after a certain 
period).

> Do you have the ping query (or validation query) enabled?
>
> Cheers,
> Clinton
>
> On 11/17/05, *mischa* <mischa.z@gmail.com <ma...@gmail.com>> 
> wrote:
>
>     is there anything i can do to prevent ibatis from putting back
>     connetions to the pool when they are already closed? i am working with
>     cluster pairs and when the connection to one cluster fails i am
>     switching back to another. it seems like the connection that
>     failed/is
>     closed is getting put back into the pool and is not getting
>     reinitialized by the pool. so even if the first cluster is back
>     online i
>     am getting a
>
>     Cause: java.sql.SQLException: No operations allowed after
>     connection closed.
>
>     any thoughts?
>     thanks,
>     mischa
>
>
>