Skip to content

Commit dbb4e21

Browse files
hwan33fmbenhassine
authored andcommitted
Fix misleading documentation regarding the ItemWriteListener
Resolves #4400
1 parent 2c0bddc commit dbb4e21

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-batch-docs/modules/ROOT/pages/step/chunk-oriented-processing/intercepting-execution.adoc

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

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

215216
The annotations corresponding to this interface are:

0 commit comments

Comments
 (0)