Skip to content

Commit 022ccd1

Browse files
committed
Revise the documentation to correct misleading information regarding the ItemWriteListener.
resolves spring-projects#4400
1 parent dcd1ac8 commit 022ccd1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,11 @@ 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.
211+
The `afterWrite` method is called after the items have been successfully written, but it
212+
occurs before the commitment of the transaction associated with the chunk's processing.
213+
If there was an error while writing, the `onWriteError` method is called.
214+
The exception encountered and the item that was attempted to be written are
213215
provided, so that they can be logged.
214216

215217
The annotations corresponding to this interface are:

0 commit comments

Comments
 (0)