Bug 59850 - StatementCache interceptor does not seem to close ResultSets
Summary: StatementCache interceptor does not seem to close ResultSets
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2016-07-13 10:49 UTC by Julian Reschke
Modified: 2016-07-21 13:44 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Julian Reschke 2016-07-13 10:49:20 UTC
It seems that when enabling the StatementCache interceptor, closeing the (proxy) statement does not cause open ResultSets to be closed.

This seems to be incorrect according to the Javadoc for Statement:

"A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results." -- <http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html>
Comment 1 Julian Reschke 2016-07-14 13:30:43 UTC
See related bug <https://issues.apache.org/jira/browse/OAK-4559>, including instructions how to reproduce.
Comment 2 Keiichi Fujino 2016-07-20 06:31:04 UTC
Thanks for the report.

Fixed at r1753454, r1753455, r1753456. and r1753457. 
- 9.0.x for 9.0.0.M10 onwards
- 8.5.x for 8.5.5 onwards
- 8.0.x for 8.0.37 onwards
- 7.0.x for 7.0.71 onwards
Comment 3 Julian Reschke 2016-07-21 13:44:22 UTC
Thanks for the fix. I tried with trunk, and the problem indeed seems to be gone.