Issue Details (XML | Word | Printable)

Key: BATCH-538
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Lucas Ward
Reporter: Lucas Ward
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Batch

HibernateCursorItemReader close() doesn't close statefull sessions correctly

Created: 01/Apr/08 01:42 PM   Updated: 07/Aug/08 10:07 AM
Component/s: Infrastructure
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

Time Tracking:
Original Estimate: 0.12d
Original Estimate - 0.12d
Remaining Estimate: 0d
Time Spent - 0.12d
Time Spent: 0.12d
Time Spent - 0.12d


 Description  « Hide
public void close(ExecutionContext executionContext) {
initialized = false;
if (cursor != null) {
cursor.close();
}
currentProcessedRow = 0;
if (useStatelessSession) {
if (statelessSession != null) {
statelessSession.close();
}
}
else {
if (statelessSession != null) {
statelessSession.close();
}
}
}

The close method above won't close correctly because if useStatelessSession is false, the statelessSession will always been false as well.

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Lucas Ward added a comment - 01/Apr/08 02:16 PM
StatefulSessions are now closed correctly. Added a unit test to make sure.

Dave Syer added a comment - 07/Aug/08 10:07 AM
Assume closed as resolved and released