Announcement Announcement Module
Collapse
No announcement yet.
When does TransactionAwareBufferedWriter automatically close its underlying Writer? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • When does TransactionAwareBufferedWriter automatically close its underlying Writer?

    Hello,

    I'm working on my own ItemWriter implementation so I've been studying the logic in the FlatFileItemWriter class, and one thing does not make sense to me: Under what circumstances would a TransactionAwareBufferedWriter automatically close its underlying Writer (i.e. the logic in the complete() method)? Why wouldn't itemStream.close() be called instead?

    Thanks,
    Kevin

  • #2
    Ah, I think I get it. If itemStream.close() is called when a transaction is in flight, the call to close the underlying stream is delayed until the transaction is committed and the buffer is flushed.

    Comment

    Working...
    X