BATCH-1381: Fixed code samples so they doesn't overflow the box in the pdf
This commit is contained in:
@@ -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><step id="step1">
|
||||
<tasklet>
|
||||
<chunk reader="flatFileItemReader" writer="itemWriter"
|
||||
commit-interval="10" <emphasis role="bold">skip-limit="10"</emphasis>>
|
||||
<emphasis role="bold"><skippable-exception-classes>
|
||||
<include class="org.springframework.batch.item.file.FlatFileParseException"/>
|
||||
</skippable-exception-classes></emphasis>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
<tasklet>
|
||||
<chunk reader="flatFileItemReader" writer="itemWriter"
|
||||
commit-interval="10" <emphasis role="bold">skip-limit="10"</emphasis>>
|
||||
<emphasis role="bold"><skippable-exception-classes>
|
||||
<include class="org.springframework.batch.item.file.FlatFileParseException"/>
|
||||
</skippable-exception-classes></emphasis>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step></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><step id="step1">
|
||||
<tasklet>
|
||||
<chunk reader="itemReader" writer="itemWriter"
|
||||
commit-interval="2" <emphasis role="bold">retry-limit="3"</emphasis>>
|
||||
<emphasis role="bold"><retryable-exception-classes>
|
||||
<include class="org.springframework.dao.DeadlockLoserDataAccessException"/>
|
||||
</retryable-exception-classes></emphasis>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
<tasklet>
|
||||
<chunk reader="itemReader" writer="itemWriter"
|
||||
commit-interval="2" <emphasis role="bold">retry-limit="3"</emphasis>>
|
||||
<emphasis role="bold"><retryable-exception-classes>
|
||||
<include class="org.springframework.dao.DeadlockLoserDataAccessException"/>
|
||||
</retryable-exception-classes></emphasis>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step></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><step id="step1">
|
||||
<tasklet>
|
||||
<chunk reader="itemReader" writer="itemWriter" commit-interval="2"/>
|
||||
<no-rollback-exception-classes>
|
||||
<include class="org.springframework.batch.item.validator.ValidationException"/>
|
||||
</no-rollback-exception-classes>
|
||||
</tasklet>
|
||||
<tasklet>
|
||||
<chunk reader="itemReader" writer="itemWriter" commit-interval="2"/>
|
||||
<no-rollback-exception-classes>
|
||||
<include class="org.springframework.batch.item.validator.ValidationException"/>
|
||||
</no-rollback-exception-classes>
|
||||
</tasklet>
|
||||
</step></programlisting>
|
||||
|
||||
<section id="transactionalReaders">
|
||||
|
||||
Reference in New Issue
Block a user