title: Spring Batch Process Indicator Pattern
body: <p>In a Spring Batch Job I am writing the item to target file (using FlatFileItemWriter) and updating input record "process indicator" field as "processed"/"failed" (using JdbcBatchItemWriter). Which is the best way to make this happen in a "item transaction" ?</p>
  
  <ol>
  <li>Using a  CompositeItemWriter (delegates FlatFileItemWriter for
  writing to file and JdbcBatchItemWriter to update the "process
  indicator" </li>
  <li>Using ItemWriteListener methods "afterWrite" and "onWriteError" to update the   "process indicator"</li>
  </ol>