tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <>
Subject Re: ConnectionPool question
Date Fri, 30 Oct 2009 13:53:59 GMT
hi Josh, calling Connection.close() does not close statements and 
There is an interceptor you can configure called StatementFinalizer that 
does exactly that during the close call.


On 10/29/2009 07:17 PM, Josh Gooding wrote:
> I wrote some code on top of the Tomcat's ConnectionPool class.  In regular
> Java based programming if I close a ResultSet with connection.close(), this
> frees up both the statement and resultset's memory associated with the
> connection if it was still open.  If I close a connection with Tomcat's
> ConnectionPool, does it also close the statement and resultset's associated
> with that particular connection or do I need to manually close them?
> I know best practice is to not rely on anything to be closed automatically,
> but I inherited a code base and I am looking at making some pretty
> significant changes to fix some problems, and this is one of them.
> Thanks in advance,
> - Josh

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

View raw message