commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Qin <>
Subject [dbcp] db connection pooling under firewall
Date Tue, 09 Sep 2003 22:35:48 GMT
I know this is a very popular topic. But I have searched through tomcat and
commons mailing list and didn't find a satisfactoried answer regarding
connection pooling working in firewalled environment.

The symptom is:

There is a timeout setup in the firewall, checkpoint. When any stateful
connection idles for a period, say 60 minutes, firewall drops the
connection. After connection is dropped, I checked both oracle and linux

- netstat tells me the connection is established;
- oracle console tells me the connection is established.

When my webapp tries to obtain a connection from the pool and this
connection happens to be the idle connection cut off by firewall, it hangs.

By looking into the oracle log, I can see that oracle throws "Io exception:
Connection timed out". Obviously, this long-await is because my webapps
thinks the connection is established and it tries to query the database.

My question is how to setup dbcp properly to keep connection alive? My
environment is

Tomcat 4.1.24 + Tomcat JNDI Data Source and Pooling (commons-dbcp)
Oracle 9i
Debian 3.0

Configuration in context is:

		<value>SELECT COUNT(*) FROM DUAL</value>



Going to war for peace is like having sex for virginity

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message