tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Fiol BonnĂ­n <fiol.bon...@terra.es>
Subject Re: connection pooling
Date Fri, 16 Apr 2004 05:58:59 GMT
I can't remember the specifics off hand, but...

There is a mechanism in DBCP that allows you to check a connection with 
a "validationQuery" (use this term when googling for it!) that can be run

a) every now and then on an idle connection (very useful if a firewall 
sits in the middle)
b) before returning the connection to the application.
c) ??? (Maybe in other cases, I can't remember.

I am not sure what happens in (b) if the validation query fails. What I 
think it should do is open a new connection (or pick another one from 
the pool if possible) and return it to the application after validation.

If it fails in (a), it simply drops the connection, AFAIK. So when 
asking for a new one, a new one is established.

Please google for details.

Yours,


Antonio Fiol


Peter Choe wrote:

> i am using connection pooling with tomcat 4.10.
>
> i am using postgresql and oracle database for various web application. 
> when either of the databases restart, tomcat can't reconnect to the 
> database and it needs to be restarted.
>
> i know that mysql has a autoreconnect to re-establish connection.  how 
> can i do this for postgresql and if anyone knows off hand, for oracle.
>
> peter choe
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


Mime
View raw message