Fixed samples ioSamples table, and added AmqpItemReader/Writer descriptions. Also

fixed some misspellings while reviewing sections for jsr-352 and added AmqpItemReader/Writer
to Appendix A - Inventory.
This commit is contained in:
Wayne Lund
2013-02-05 15:58:44 -08:00
parent 607e98cd9b
commit a7a30cf2ea
3 changed files with 56 additions and 24 deletions

View File

@@ -43,6 +43,7 @@ Source code can also be browsed and downloaded at {{{http://github.com/SpringSou
* How do I process the data and write to the output source? How
and what business logic is being applied to the processing of a
record?
{{adhocLoop}} | | | | |x | | | | | | | | |
* How do I recover from an exception while operating on the output
source? There are numerous recovery strategies that can be applied
@@ -60,6 +61,8 @@ Source code can also be browsed and downloaded at {{{http://github.com/SpringSou
*----+----+----+----+----+----+----+----+----+----+----+----+
{{adhocLoop}} | | | | |x | | | | | | | | |
*----+----+----+----+----+----+----+----+----+----+----+----+
{{AmqpJobFunctionalTests}} | | | | | | | | | |x | | | |
*----+----+----+----+----+----+----+----+----+----+----+----+
{{beanWrapperMapperSample}} | | | |x | | | | | | | | | |
*----+----+----+----+----+----+----+----+----+----+----+----+
{{compositeItemWriterSample}}| | | | | | |x | | | | | | |
@@ -101,29 +104,29 @@ Source code can also be browsed and downloaded at {{{http://github.com/SpringSou
The <<<ioSampleJob>>> ({ioSample}) has a number of special instances that show different IO features using the same job configuration but with different readers and writers:
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
|<<Job / Feature>> | <<delimited input>> | <<fixed-length input>> | <<xml input>> | <<db paging input>> | <<db cursor input>> | <<delimited output>> | <<fixed-length output>> | <<xml output>> | <<db output>> | <<multiple files>> | <<multi-line>> | multi-record |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
delimited |x | | | | | | |x | | | | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
{{fixedLength}} | |x | | | | | | |x | | | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
{{ibatis}} | | | | |x | | | | | |x | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
hibernate | | | | |x | | | | | |x | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
{{jdbcCursor}} | | | | |x | | | | | |x | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
jpa | | | |x | | | | | | |x | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
multiLine |x | | | | | | |x | | | | |x | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
multiRecordtype | |x | | | | | | |x | | | | |x |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
multiResource |x | | | | | | |x | | | |x | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
{{xml}} | | |x | | | | | | |x | | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+
*----+----+----+----+----+----+----+----+----+----+----+----++
|<<Job / Feature>> | <<delimited input>> | <<fixed-length input>> | <<xml input>> | <<db paging input>> | <<db cursor input>> | <<delimited output>> | <<fixed-length output>> | <<xml output>> | <<db output>> | <<multiple files>> | <<multi-line>> | <<multi-record>> |
*----+----+----+----+----+----+----+----+----+----+----+----++
delimited |x | | | | | | |x | | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++
{{fixedLength}} | |x | | | | | | |x | | | |
*----+----+----+----+----+----+----+----+----+----+----+----++
{{ibatis}} | | | | |x | | | | | |x | |
*----+----+----+----+----+----+----+----+----+----+----+----++
hibernate | | | | |x | | | | | |x | |
*----+----+----+----+----+----+----+----+----+----+----+----++
{{jdbcCursor}} | | | | |x | | | | | |x | |
*----+----+----+----+----+----+----+----+----+----+----+----++
jpa | | | |x | | | | | | |x | |
*----+----+----+----+----+----+----+----+----+----+----+----++
multiLine |x | | | | | | |x | | |x | |
*----+----+----+----+----+----+----+----+----+----+----+----++
multiRecordtype | |x | | | | | | |x | | |x |
*----+----+----+----+----+----+----+----+----+----+----+----++
multiResource |x | | | | | | |x | | | |x |
*----+----+----+----+----+----+----+----+----+----+----+----++
{{xml}} | | |x | | | | | | |x | | |
*----+----+----+----+----+----+----+----+----+----+----+----++
* Common Sample Source Structures
@@ -183,6 +186,19 @@ multiResource |x | | | | | | |x | | | |x | | |
one place, since it contains a static constant value (<<<QUERY>>>)
which is used to configure the query for the writer.
* Amqp Job Sample ({AmqpJobFunctionalTest})
This sample shows the use of Spring Batch to write to an <<<AmqpItemWriter>>>.
The AmqpItemReader and Writer were contributed by Chris Schaeffer and
a blog entry can be found at http://blog.dtzq.com/2012/08/spring-batch-amqp-itemreader-itemwriter.html.
It is modeled after the JmsItemReader / Writer implementations, which
are popular models for remote chunking. It leverages the AmqpTemplate.
This example requires the env to have a copy of rabbitmq installed
and running. The standard dashboard can be used to see the traffic
from the <<<MessageProducer>>> to the AmqpItemWriter. Make sure you
launch the <<<MessageProducer>>> before launching the test.
* BeanWrapperMapper Sample ({beanWrapperMapperSample})
This sample shows the use of automatic mapping from fields in a file
@@ -201,6 +217,7 @@ multiResource |x | | | | | | |x | | | |x | | |
camel-casing (e.g. <<<CREDIT_CARD>>> instead of <<<creditCard>>>)
also work.
* Composite ItemWriter Sample ({compositeItemWriterSample})
This shows a common use case using a composite pattern, composing

View File

@@ -103,6 +103,13 @@
received through the injected JmsOperations receive()
method</entry>
</row>
<row>
<entry align="left">AmqpItemReader</entry>
<entry align="left">Given a Spring AmqpTemplate it provides
synchronous receive methods. The receiveAndConvert() method
lets you receive POJO objects. </entry>
</row>
<row>
<entry align="left">JpaPagingItemReader</entry>
@@ -217,6 +224,14 @@
convert each item to XML and then writes it to an XML file using
StAX.</entry>
</row>
<row>
<entry align="left">AmqpItemWriter</entry>
<entry align="left">Given a Spring AmqpTemplate it provides
for synchronous send method. The convertAndSend(Object)
method lets you send POJO objects. </entry>
</row>
</tbody>
</tgroup>
</table>

View File

@@ -494,7 +494,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>
classes 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