https://issues.apache.org/bugzilla/show_bug.cgi?id=46200
Summary: jdbc-pool needs to close opened assets too
Product: Tomcat 6
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Given the following psuedo code:
for (i in 0..10) {
Connection con = datasource.getConnection();
Statement st = con.createStatement();
ResultSet rs = null;
for (j in 0..50) {
st = con.createStatement();
rs = st.executeQuery("select '${i}.${j}' from dual");
}
// notice the lack of closing the rs, and st
con.close();
}
This will blowup depending on your database vendor's config on how many open
cursors can be open at a given time.
Connection.close() implies that all Statements and PreparedStatements should
also be closed too.
Of course the above is subject to interpretation - but I've seen to many times
int he wild Connections which are opened but its statements/result sets are
not.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]