I've added the following to the configuration:

testWhileIdle="true"
timeBetweenEvictionRunsMillis="300000"
minEvictableIdleTimeMillis="600000"

with the intention that any idle connections would be evicted and closed normally before the firewall terminated them. Does specifying these enable the evictor thread? Does this seem like a reasonable approach?

Thanks!

--john

John Cartwright wrote:
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!

--john

<Resource name="jdbc/CHEETAH"
         type="javax.sql.DataSource"
         auth="Container"
         username="dbuser"
         password="dbpasswd"
         driverClassName="oracle.jdbc.OracleDriver"
         url="jdbc:oracle:thin:@myhost:1521:CHEETAH"
         maxActive="8"
         maxIdle="4"
         validationQuery="select 1 from dual" />

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to