You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "lauradiara@libero.it" <la...@libero.it> on 2002/10/04 17:37:43 UTC

Connection pool DBCP

I have been seen that nobody is able to answer to this question, I 
presume it's interesting for anybody, for a few days.

I wish I knew if DBCP is able to find when db is restarted and 
reconnect.

I'd like to use the jakarta instrument DBCP because all the products of 
the jakarta community are very good, but the main point is to know if 
DBCP can recconect to DB lonely.

Can some answer to this question?

Thanks


Laura


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Connection pool DBCP

Posted by Pae Choi <pa...@earthlink.net>.
I have not tested DBCP for this specific one yet, but this is an interesting
one to do down the road.

Just from my top of head, it should not be a difficult challenge. For
example,
you can create a listener that runs with a separate thread to check the
connection heartbeat.

Since 'dbcp' is commonly used with 'pool' package, the question is where
would be an ideal place to place the mechanism. But this is a design issue,
not the feasibility issue. ^^

Regards,


Pae




----- Original Message -----
From: "Nikola Milutinovic" <Ni...@ev.co.yu>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Saturday, October 05, 2002 3:16 AM
Subject: Re: Connection pool DBCP


> lauradiara@libero.it wrote:
>
> > I have been seen that nobody is able to answer to this question, I
> > presume it's interesting for anybody, for a few days.
> >
> > I wish I knew if DBCP is able to find when db is restarted and
> > reconnect.
> >
> > I'd like to use the jakarta instrument DBCP because all the products of
> > the jakarta community are very good, but the main point is to know if
> > DBCP can recconect to DB lonely.
> >
> > Can some answer to this question?
>
> Don't take my word for it, but I think it cannot. It could be that the
main
> problem is the JDBC interface. Does it have any method to determine if the
DB
> went down and to check if it came up again? Or any way to determine that
JDBC
> connections have been disconnected?
>
> Nix.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Connection pool DBCP

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
lauradiara@libero.it wrote:

> I have been seen that nobody is able to answer to this question, I 
> presume it's interesting for anybody, for a few days.
> 
> I wish I knew if DBCP is able to find when db is restarted and 
> reconnect.
> 
> I'd like to use the jakarta instrument DBCP because all the products of 
> the jakarta community are very good, but the main point is to know if 
> DBCP can recconect to DB lonely.
> 
> Can some answer to this question?

Don't take my word for it, but I think it cannot. It could be that the main 
problem is the JDBC interface. Does it have any method to determine if the DB 
went down and to check if it came up again? Or any way to determine that JDBC 
connections have been disconnected?

Nix.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Connection pool DBCP

Posted by john <jo...@riskdecisions.com>.
I don't know about the particular connection pool you are using, but in
general I believe the mechanism would be similar to that implemented by
Sybase's Jaguar ejb/servlet engine.  There a "sanity check" is run on each
connection after it has been returned to the pool and before it is re-used.
For Sybase it's "select 1 from dummy", for Oracle it could be "Select 1 from
dual".  If the database had been restarted then the cached connection would
fail its sanity check and would be released and replaced by a new
connection.  I don't know of any other database independent way of doing
this.

Best Wishes
John Burgess
john@riskdecisions.com
Tel: 01865 718666
Fax: 01865 718600


-----Original Message-----
From: lauradiara@libero.it [mailto:lauradiara@libero.it]
Sent: Friday, October 04, 2002 4:38 PM
To: tomcat-user
Subject: Connection pool DBCP


I have been seen that nobody is able to answer to this question, I
presume it's interesting for anybody, for a few days.

I wish I knew if DBCP is able to find when db is restarted and
reconnect.

I'd like to use the jakarta instrument DBCP because all the products of
the jakarta community are very good, but the main point is to know if
DBCP can recconect to DB lonely.

Can some answer to this question?

Thanks


Laura


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/02


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/02



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>