Out of Date
Details
Assignee
UnassignedUnassignedReporter
Dirk FeufelDirk FeufelOriginal estimate
Time tracking
No time logged1h remainingComponents
Affects versions
Priority
Minor
Details
Details
Assignee
Unassigned
UnassignedReporter
Dirk Feufel
Dirk FeufelOriginal estimate
Time tracking
No time logged1h remaining
Components
Affects versions
Priority
Created February 28, 2007 at 1:41 PM
Updated March 7, 2014 at 5:30 PM
Resolved January 9, 2012 at 5:21 PM
If you call this type of code (like the DbTimestampType class does), the AbstractBatcher outputs a warning "Could not close a JDBC result set".
The problem should be that closing the prepared statement internally also closes the associated result sets and the AbstractBatcher still has a reference to this result set.
One possible solution might be to provide an additional method
public void closeStatement(PreparedStatement ps, ResultSet rs);
(as already present for closeQueryStatement) in the AbstractBatcher allowing to close both in the right order.
PreparedStatement ps = null;
try {
ps = session.getBatcher().prepareStatement( timestampSelectString );
ResultSet rs = session.getBatcher().getResultSet( ps );
....
} finally {
if ( ps != null ) {
session.getBatcher().closeStatement( ps );
}
}