commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Clark" <>
Subject RE: [DBCP] re-establish severed connections
Date Mon, 23 Feb 2009 17:58:02 GMT


This will cause the idle object evictor thread to wake up every five
second, and test 5 threads with the validation query. We use this in our
application because we were having dead threads being given to the
application, as we don't test on borrow.  You may need to set the
minEvictableIdleTimeMillis to something other than the default, which is
30 minutes.

-----Original Message-----
From: John Cartwright [] 
Sent: Monday, February 23, 2009 8:38 AM
To: Commons Users List
Subject: [DBCP] re-establish severed connections

Hello All,

We've recently installed a firewall that terminates connections that
have not had any traffic for 30 minutes.  This has caused problems with
our connection-pooled webapps in tomcat, since the connections in the
pool get severed.  I added a validation query, but it seems like the
first request after a period of inactivity hangs and subsequent requests
work normally.

I don't see any kind of "keepalive" setting for the pool - can someone
suggest a better strategy or settings to get around this problem?  I'm
using Oracle 10.2 and tomcat 6.0.18.  Here's my current configuration
w/in the context.xml.

Thanks for any suggestions!


<Resource name="jdbc/CHEETAH"
          validationQuery="select 1 from dual" />

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message