Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-125

ItemReaders and ItemWriters are closed twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.DR10
    • 7.0.0.DR1
    • Batch
    • None
    • Hide

      Any chunk-style step which for example logs a message in the close() method of the reader or the writer

      Show
      Any chunk-style step which for example logs a message in the close() method of the reader or the writer

      The two lines here: https://github.com/jberet/jsr352/blob/1.1.0.Final/jberet-core/src/main/java/org/jberet/runtime/runner/ChunkRunner.java#L196 close the ItemWriter and ItemReader after a chunk is processed.
      However, it is in a try-finally block, and in the finally block, they are closed again: https://github.com/jberet/jsr352/blob/1.1.0.Final/jberet-core/src/main/java/org/jberet/runtime/runner/ChunkRunner.java#L236

      In case the first attempt succeeded, the same writer and reader are closed twice.

            jmartisk@redhat.com Jan Martiska
            jmartisk@redhat.com Jan Martiska
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: