From 42c09e3dd735920cb76f3fa656cdcfc7ff3780a1 Mon Sep 17 00:00:00 2001 From: dsyer Date: Thu, 14 Aug 2008 09:23:45 +0000 Subject: [PATCH] BATCH-220: docs changes for step handler --- docs/src/site/docbook/reference/core.xml | 4 ++-- docs/src/site/docbook/reference/execution.xml | 22 ++++++++++--------- src/site/apt/features.apt | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/src/site/docbook/reference/core.xml b/docs/src/site/docbook/reference/core.xml index 297f0f780..e63affabb 100644 --- a/docs/src/site/docbook/reference/core.xml +++ b/docs/src/site/docbook/reference/core.xml @@ -605,7 +605,7 @@ Step interface. Two step implementation classes are available in the Spring Batch framework, and they are each discussed in detail in Chatper 4 of this guide. For most situations, the - ItemOrientedStep implementation is sufficient, + StepHandlerStep implementation is sufficient, but for situations where only one call is needed, such as a stored procedure call or a wrapper around existing script, a TaskletStep may be a better option. @@ -1050,4 +1050,4 @@ logic that is not natural to split into read-(transform)-write phases, such as invoking a system command or a stored procedure. - \ No newline at end of file + diff --git a/docs/src/site/docbook/reference/execution.xml b/docs/src/site/docbook/reference/execution.xml index 8fa2405bd..79489ecc6 100644 --- a/docs/src/site/docbook/reference/execution.xml +++ b/docs/src/site/docbook/reference/execution.xml @@ -796,7 +796,7 @@
- ItemOrientedStep + StepHandlerStep The figure above shows a simple 'item-oriented' execution flow. One item is read in from an ItemReader, and then @@ -804,7 +804,7 @@ items left. When processing first begins, a transaction is started and periodically committed until the Step is complete. Given these basic requirements, the - ItemOrientedStep requires the following + StepHandlerStep requires the following dependencies, at a minimum: @@ -839,7 +839,7 @@ SimpleStepFactoryBean Despite the relatively short list of required dependencies for - an ItemOrientedStep, it is an extremely complex + an StepHandlerStep, it is an extremely complex class that can potentially contain many collaborators. In order to ease configuration, a SimpleStepFactoryBean can be used: @@ -862,7 +862,7 @@
Configuring a CommitInterval - As mentioned above, the ItemOrientedStep + As mentioned above, the StepHandlerStep reads in and writes out items, periodically commiting using the supplied PlatformTransactionManager. By default, it will commit after each item has been written. This is less @@ -1397,7 +1397,7 @@
TaskletStep - ItemOriented processing is not the only way to process in a + Item oriented processing is not the only way to process in a Step. What if a Step must consist as a simple storec procedure call? You could implement the call as an ItemReader and return null after the @@ -1565,10 +1565,12 @@
Logging Item Processing and Failures - A common use case is the need for special handling of errors in a - step, item by item, perhaps logging to a special channel, or inserting a - record into a database. The ItemOrientedStep (created from the step - factory beans) allows users to implement this use case with a simple + A common use case is the need for special handling of + errors in a step, item by item, perhaps logging to a special + channel, or inserting a record into a + database. The StepHandlerStep (created + from the step factory beans) allows users to implement this use + case with a simple ItemReadListener, for errors on read, and an ItemWriteListener, for errors on write. The below code snippets illustrate a listener that logs both read and write @@ -1769,4 +1771,4 @@ itself.
- \ No newline at end of file + diff --git a/src/site/apt/features.apt b/src/site/apt/features.apt index 870227b93..6d04d1686 100644 --- a/src/site/apt/features.apt +++ b/src/site/apt/features.apt @@ -80,7 +80,7 @@ Spring Batch Features and Roadmap represenation of the state of the job - can be augmented by developers). - * ItemOrientedStep - uses an ItemReader to obtain the next record to + * StepHandlerStep - uses an ItemReader to obtain the next record to process, and hands it to an ItemWriter if it is not null. It can run a StepExecution in the same process (VM).