Results 1 to 2 of 2

Thread: When does TransactionAwareBufferedWriter automatically close its underlying Writer?

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    7

    Default 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. #2
    Join Date
    Dec 2009
    Posts
    7

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •