Is Spring Batch JpaItemWriter
stateful? i mean if through writing process a failure happened does it know where is that left?
No. The JpaItemWriter
maintains no state. State for a failure is handled at the reader side of the step in most cases (since it's the one providing the items to be written).