RESOLVED BATCH-737: JdbcCursorItemReader will spin through entire resultset if numberOfProcessRows=0

This commit is contained in:
dsyer
2008-07-21 08:27:40 +00:00
parent 83aa1f6fb2
commit e338f24233
2 changed files with 31 additions and 4 deletions

View File

@@ -259,11 +259,8 @@ public class JdbcCursorItemReader<T> extends AbstractBufferedItemReaderItemStrea
private void moveCursorToRow(int row) {
try {
int count = 0;
while (rs.next()) {
while (row!=count && rs.next()) {
count++;
if (count == row) {
break;
}
}
}
catch (SQLException se) {