BATCH-1381: Fixed code samples so they doesn't overflow the box in the pdf

This commit is contained in:
dhgarrette
2009-08-23 20:16:54 +00:00
parent 44630b5bfb
commit f81cfa2012

View File

@@ -474,14 +474,14 @@ itemWriter.write(items);</programlisting>
information, then there probably won't be issues. Usually these bad
records are logged as well, which will be covered later when discussing
listeners.<programlisting>&lt;step id="step1"&gt;
&lt;tasklet&gt;
&lt;chunk reader="flatFileItemReader" writer="itemWriter"
commit-interval="10" <emphasis role="bold">skip-limit="10"</emphasis>&gt;
<emphasis role="bold">&lt;skippable-exception-classes&gt;
&lt;include class="org.springframework.batch.item.file.FlatFileParseException"/&gt;
&lt;/skippable-exception-classes&gt;</emphasis>
&lt;/chunk&gt;
&lt;/tasklet&gt;
&lt;tasklet&gt;
&lt;chunk reader="flatFileItemReader" writer="itemWriter"
commit-interval="10" <emphasis role="bold">skip-limit="10"</emphasis>&gt;
<emphasis role="bold">&lt;skippable-exception-classes&gt;
&lt;include class="org.springframework.batch.item.file.FlatFileParseException"/&gt;
&lt;/skippable-exception-classes&gt;</emphasis>
&lt;/chunk&gt;
&lt;/tasklet&gt;
&lt;/step&gt;</programlisting></para>
<para>In this example, a <classname>FlatFileItemReader</classname> is
@@ -516,7 +516,7 @@ itemWriter.write(items);</programlisting>
refines the list of skippable exception classes to be all
<classname>Exception</classname>s <emphasis>except</emphasis>
<classname>FileNotFoundException</classname>. Any excluded exception
calsses will be fatal if encountered (i.e. not skipped). </para>
calsses will be fatal if encountered (i.e. not skipped).</para>
<para>For any exception encountered, the skippability will be determined
by the nearest superclass in the class hierarchy. Any unclassifed
@@ -540,14 +540,14 @@ itemWriter.write(items);</programlisting>
success. In this case, retry should be configured:</para>
<programlisting>&lt;step id="step1"&gt;
&lt;tasklet&gt;
&lt;chunk reader="itemReader" writer="itemWriter"
commit-interval="2" <emphasis role="bold">retry-limit="3"</emphasis>&gt;
<emphasis role="bold">&lt;retryable-exception-classes&gt;
&lt;include class="org.springframework.dao.DeadlockLoserDataAccessException"/&gt;
&lt;/retryable-exception-classes&gt;</emphasis>
&lt;/chunk&gt;
&lt;/tasklet&gt;
&lt;tasklet&gt;
&lt;chunk reader="itemReader" writer="itemWriter"
commit-interval="2" <emphasis role="bold">retry-limit="3"</emphasis>&gt;
<emphasis role="bold">&lt;retryable-exception-classes&gt;
&lt;include class="org.springframework.dao.DeadlockLoserDataAccessException"/&gt;
&lt;/retryable-exception-classes&gt;</emphasis>
&lt;/chunk&gt;
&lt;/tasklet&gt;
&lt;/step&gt;</programlisting>
<para>The <classname>Step</classname> allows a limit for the number of
@@ -571,12 +571,12 @@ itemWriter.write(items);</programlisting>
exceptions that should not cause rollback.</para>
<programlisting>&lt;step id="step1"&gt;
&lt;tasklet&gt;
&lt;chunk reader="itemReader" writer="itemWriter" commit-interval="2"/&gt;
&lt;no-rollback-exception-classes&gt;
&lt;include class="org.springframework.batch.item.validator.ValidationException"/&gt;
&lt;/no-rollback-exception-classes&gt;
&lt;/tasklet&gt;
&lt;tasklet&gt;
&lt;chunk reader="itemReader" writer="itemWriter" commit-interval="2"/&gt;
&lt;no-rollback-exception-classes&gt;
&lt;include class="org.springframework.batch.item.validator.ValidationException"/&gt;
&lt;/no-rollback-exception-classes&gt;
&lt;/tasklet&gt;
&lt;/step&gt;</programlisting>
<section id="transactionalReaders">