ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Alexander <D.Alexan...@lse.ac.uk>
Subject RE: C3P0 configuration example for iBatis anyone?
Date Mon, 02 Jun 2008 14:59:18 GMT

Anton Rothenbacher wrote:
> We have a firewall between the db and webserver which is closing inactive
> connections when the app sits idle for a period of time. After the idle
> period, the first person who attempts to logon to the website experiences
> a 15 minute lag while it waits for the connection pool to deem the
> connection it selected out of the pool bad, recycle it and start using the
> fresh connection. We are open to using any connection pool mechanism with
> ibatis that has an option to test idle pooled connections and recycle them
> if they are deemed bad on a configurable basis. 
In his excellent book "Release It! - Design and Deploy Production-Ready
Software", Michael T Nygard describes a problem scenario pretty much like
that. Rather than testing idle pooled connections, the solution was to
enable an Oracle feature called "dead connction detection". This would
feature had the Oracle server "ping" the (application server) client at
regular intervals. As this ensured regular traffic through the firewall for
the connection it ensured the firewall didn't drop it.

Hope that helps.
View this message in context: http://www.nabble.com/C3P0-configuration-example-for-iBatis-anyone--tp17550979p17603358.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message