BATCH-1052: Moved section on SystemCommandTasklet to common-patterns.xml

This commit is contained in:
dhgarrette
2009-02-02 17:51:26 +00:00
parent c317015d58
commit 4317b95f41
2 changed files with 22 additions and 23 deletions

View File

@@ -392,4 +392,24 @@
return null;
}</programlisting>
</section>
<section>
<title>Executing System Commands</title>
<para>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. </para>
<para>Because the need is so common, Spring Batch provides a
<classname>Tasklet</classname> implementation for calling system
commands:</para>
<programlisting> &lt;bean class="org.springframework.batch.sample.tasklet.SystemCommandTasklet"&gt;
&lt;property name="command" value="echo hello" /&gt;
&lt;!-- 5 second timeout for the command to complete --&gt;
&lt;property name="timeout" value="5000" /&gt;
&lt;/bean&gt;</programlisting>
</section>
</chapter>

View File

@@ -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:
</para>
this reason, the step can be configured to not buffer the
items:</para>
<programlisting>
&lt;step name="step1"&gt;
@@ -952,27 +952,6 @@
&lt;/property&gt;
&lt;/bean&gt;
</programlisting>
</section>
<section>
<title>Executing System Commands</title>
<para>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 <classname>Tasklet</classname> implementation for
calling system commands:</para>
<programlisting>
&lt;bean class="org.springframework.batch.sample.tasklet.SystemCommandTasklet"&gt;
&lt;property name="command" value="echo hello" /&gt;
&lt;!-- 5 second timeout for the command to complete --&gt;
&lt;property name="timeout" value="5000" /&gt;
&lt;/bean&gt;
</programlisting>
</section>
</section>