From 4317b95f4156f596cd19a22d7102942a3f95c8f2 Mon Sep 17 00:00:00 2001 From: dhgarrette Date: Mon, 2 Feb 2009 17:51:26 +0000 Subject: [PATCH] BATCH-1052: Moved section on SystemCommandTasklet to common-patterns.xml --- .../docbook/reference/common-patterns.xml | 20 +++++++++++++++ docs/src/site/docbook/reference/step.xml | 25 ++----------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/src/site/docbook/reference/common-patterns.xml b/docs/src/site/docbook/reference/common-patterns.xml index 7ea604469..60a1f630b 100644 --- a/docs/src/site/docbook/reference/common-patterns.xml +++ b/docs/src/site/docbook/reference/common-patterns.xml @@ -392,4 +392,24 @@ return null; } + +
+ Executing System Commands + + Many batch jobs may require that an external command be called from + within the batch job. Such a process could be kicked off separately by the + scheduler, but the advantage of common meta-data about the run would be + lost. Furthermore, a multi-step job would also need to be split up into + multiple jobs as well. + + Because the need is so common, Spring Batch provides a + Tasklet implementation for calling system + commands: + + <bean class="org.springframework.batch.sample.tasklet.SystemCommandTasklet"> + <property name="command" value="echo hello" /> + <!-- 5 second timeout for the command to complete --> + <property name="timeout" value="5000" /> + </bean> +
diff --git a/docs/src/site/docbook/reference/step.xml b/docs/src/site/docbook/reference/step.xml index c8e6a9383..28e76efe7 100644 --- a/docs/src/site/docbook/reference/step.xml +++ b/docs/src/site/docbook/reference/step.xml @@ -464,8 +464,8 @@ top of a transactional resource, such as a JMS queue. In this case, since the queue is tied to the transaction that is rolled back, the messages that have been pulled from the queue will be put back on. For - this reason, the step can be configured to not buffer the items: - + this reason, the step can be configured to not buffer the + items: <step name="step1"> @@ -952,27 +952,6 @@ </property> </bean> - - - -
- Executing System Commands - - Many batch jobs may require that an external command be called - from within the batch job. Such a process could be kicked off separately - by the scheduler, but the advantage of common meta-data about the run - would be lost. Furthermore, a multi-step job would also need to be split - up into multiple jobs as well. Because the need is so common, Spring - Batch provides a Tasklet implementation for - calling system commands: - - - <bean class="org.springframework.batch.sample.tasklet.SystemCommandTasklet"> - <property name="command" value="echo hello" /> - <!-- 5 second timeout for the command to complete --> - <property name="timeout" value="5000" /> - </bean> -