Skip to content

Commit f56a21c

Browse files
committed
Fix misleading documentation regarding the ItemWriteListener
Backported from e785391 Issue #4400
1 parent 8ca9c6e commit f56a21c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-batch-docs/src/main/asciidoc/step.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,9 +1184,10 @@ public interface ItemWriteListener<S> extends StepListener {
11841184
----
11851185

11861186
The `beforeWrite` method is called before `write` on the `ItemWriter` and is handed the
1187-
list of items that is written. The `afterWrite` method is called after the item has been
1188-
successfully written. If there was an error while writing, the `onWriteError` method is
1189-
called. The exception encountered and the item that was attempted to be written are
1187+
list of items that is written. The `afterWrite` method is called after the items have been
1188+
successfully written, but before committing the transaction associated with the chunk's processing.
1189+
If there was an error while writing, the `onWriteError` method is called.
1190+
The exception encountered and the item that was attempted to be written are
11901191
provided, so that they can be logged.
11911192

11921193
The annotations corresponding to this interface are:

0 commit comments

Comments
 (0)