diff --git a/docs/src/site/docbook/reference/step.xml b/docs/src/site/docbook/reference/step.xml index 60b787113..fc0b9df9e 100644 --- a/docs/src/site/docbook/reference/step.xml +++ b/docs/src/site/docbook/reference/step.xml @@ -13,8 +13,8 @@ developer desires. A simple Step might load data from a file into the database, requiring little or no code. (depending upon the implementations used) A more complex Step may have - complicated business rules that are applied as part of the processing. - + complicated business rules that are applied as part of the + processing. @@ -38,7 +38,7 @@ ItemReader, handed to an ItemWriter, and aggregated. Once the number of items read equals the commit interval, the entire chunk is written out via - the ItemWriter, and then the transaction is committed. + the ItemWriter, and then the transaction is committed. @@ -54,8 +54,8 @@ - Below is a code representation of the same concepts shown above: - + Below is a code representation of the same concepts shown + above: List items = new Arraylist(); @@ -780,6 +780,32 @@ @OnSkipInProcess + +
+ SkipListeners and Transactions + + One of the most common use cases for a + SkipListener is to log out a skipped item, so + that another batch process or even human process can be used to + evaluate and fix the issue leading to the skip. Because there are + many cases in which the original trasaction may be rolledback, + Spring Batch makes two garantees: + + + + The appropriate skip method (depending on when the error + happened) will only be called once per item. + + + + The SkipListener will always be + called just before the transaction is committed. This is to + ensure that any transactional resources call by the listener are + not rolled back by a failure within the + ItemWriter. + + +
@@ -956,7 +982,7 @@
- This can be achieved using the 'next' attribute of + This can be achieved using the 'next' attribute of Step: @@ -1135,7 +1161,7 @@
- Configuring for Stop + Configuring for Stop If it is desired that the batch job stop under certain conditions, then either the "stop" tag or the "end" tag may be used.