You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by foo java <fo...@googlemail.com> on 2006/01/18 16:56:37 UTC

coomons dbcp refresh connections - how?

Hi,

I am using jakarta commons DBCP package to pool the jdbc connections. I am
wondering is there any way with it to refresh the connections between pool
and database?

Say, in case at the start the connections are established between pool and
database. Client request and return the connection to the pool. In case
because of network down or database down, the connection between pool and db
gets broken. Is there any way to judge and refresh the connection between
pool and db??

Any ideas??

regards,
foo

Re: coomons dbcp refresh connections - how?

Posted by foo java <fo...@googlemail.com>.
Hi,

Thanks for your reply. Do you mean to say it is a default feature of dbcp? I
don't think so.
Or have you put some configuration setting to get the connections refreshed.

Please reply.

Regards,
foojava


On 1/18/06, praveen gunda <pr...@gmail.com> wrote:
>
> Once DBCP notices a stale connection it refreshes that connection.
> I have been using this from a year now. Our DB is restarted every sunday
> morning and I rarely have problems with the connections.
>
> DBCP seems to refresh the connections for me. But anyway my pool size is
> fairly low, so my connection pool is refreshed in no time.
>
>
>
> On 1/18/06, foo java <fo...@googlemail.com> wrote:
> >
> > Hi,
> >
> > I am using jakarta commons DBCP package to pool the jdbc connections. I
> am
> > wondering is there any way with it to refresh the connections between
> pool
> > and database?
> >
> > Say, in case at the start the connections are established between pool
> and
> > database. Client request and return the connection to the pool. In case
> > because of network down or database down, the connection between pool
> and
> > db
> > gets broken. Is there any way to judge and refresh the connection
> between
> > pool and db??
> >
> > Any ideas??
> >
> > regards,
> > foo
> >
> >
>
>

Re: coomons dbcp refresh connections - how?

Posted by praveen gunda <pr...@gmail.com>.
Once DBCP notices a stale connection it refreshes that connection.
I have been using this from a year now. Our DB is restarted every sunday
morning and I rarely have problems with the connections.

DBCP seems to refresh the connections for me. But anyway my pool size is
fairly low, so my connection pool is refreshed in no time.



On 1/18/06, foo java <fo...@googlemail.com> wrote:
>
> Hi,
>
> I am using jakarta commons DBCP package to pool the jdbc connections. I am
> wondering is there any way with it to refresh the connections between pool
> and database?
>
> Say, in case at the start the connections are established between pool and
> database. Client request and return the connection to the pool. In case
> because of network down or database down, the connection between pool and
> db
> gets broken. Is there any way to judge and refresh the connection between
> pool and db??
>
> Any ideas??
>
> regards,
> foo
>
>