You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thomas Recloux <th...@gmail.com> on 2005/01/13 14:41:57 UTC

Dead connections detection

Hello ,

I'm using tomcat 4.1.29 on a linux box for deploying a web application.
This application uses a db2 connection pool using the tomcat
datasource with dbcp.

For some reasons, this connections die (server restart, force
deconnection). The problem is that I must restart Tomcat for
reinitializing connections.

How could I configure Tomcat for him to detect dead connections ?

Thanks, Thomas

-- 
Thomas Recloux

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Dead connections detection

Posted by Thomas Recloux <th...@gmail.com>.
On Thu, 13 Jan 2005 14:41:57 +0100, Thomas Recloux
<th...@gmail.com> wrote:

> How could I configure Tomcat for him to detect dead connections ?

I had a look at DBCP and saw the properties "testOnBorrow" and
"validationQuery".

I just had to set this properties in my server.xml file and that seems to work.
It tests de db connection when a connection is taken from the pool. It
can cause a db overhead but in my case, a little app, I do not matter.

-- 
Thomas Recloux

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org