From a7a30cf2ea2daec4c06fcccdd9fddd20c82356d3 Mon Sep 17 00:00:00 2001 From: Wayne Lund Date: Tue, 5 Feb 2013 15:58:44 -0800 Subject: [PATCH 1/2] 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. --- spring-batch-samples/src/site/apt/index.apt | 63 +++++++++++++-------- src/site/docbook/reference/appendix.xml | 15 +++++ src/site/docbook/reference/step.xml | 2 +- 3 files changed, 56 insertions(+), 24 deletions(-) diff --git a/spring-batch-samples/src/site/apt/index.apt b/spring-batch-samples/src/site/apt/index.apt index a223629a9..5f1d323fe 100644 --- a/spring-batch-samples/src/site/apt/index.apt +++ b/spring-batch-samples/src/site/apt/index.apt @@ -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 <<>> ({ioSample}) has a number of special instances that show different IO features using the same job configuration but with different readers and writers: -*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+ -|<> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | 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 | | | | | -*----+----+----+----+----+----+----+----+----+----+----+----++----+----+----+----+----+----+----+----+----+----+----+----+ +*----+----+----+----+----+----+----+----+----+----+----+----++ +|<> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | +*----+----+----+----+----+----+----+----+----+----+----+----++ +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 (<<>>) 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 <<>>. + 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 <<>> to the AmqpItemWriter. Make sure you + launch the <<>> 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. <<>> instead of <<>>) also work. + * Composite ItemWriter Sample ({compositeItemWriterSample}) This shows a common use case using a composite pattern, composing diff --git a/src/site/docbook/reference/appendix.xml b/src/site/docbook/reference/appendix.xml index 8c59b39de..13a73dd09 100644 --- a/src/site/docbook/reference/appendix.xml +++ b/src/site/docbook/reference/appendix.xml @@ -103,6 +103,13 @@ received through the injected JmsOperations receive() method + + AmqpItemReader + + Given a Spring AmqpTemplate it provides + synchronous receive methods. The receiveAndConvert() method + lets you receive POJO objects. + JpaPagingItemReader @@ -217,6 +224,14 @@ convert each item to XML and then writes it to an XML file using StAX. + + AmqpItemWriter + + Given a Spring AmqpTemplate it provides + for synchronous send method. The convertAndSend(Object) + method lets you send POJO objects. + + diff --git a/src/site/docbook/reference/step.xml b/src/site/docbook/reference/step.xml index 043939a58..537dafc99 100644 --- a/src/site/docbook/reference/step.xml +++ b/src/site/docbook/reference/step.xml @@ -494,7 +494,7 @@ itemWriter.write(items); refines the list of skippable exception classes to be all Exceptions except FileNotFoundException. Any excluded exception - calsses will be fatal if encountered (i.e. not skipped). + classes will be fatal if encountered (i.e. not skipped). For any exception encountered, the skippability will be determined by the nearest superclass in the class hierarchy. Any unclassifed From 5b5a42a6a6b89fbf58ed40d3d49bebd08a92f2fd Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Wed, 6 Feb 2013 14:57:14 -0600 Subject: [PATCH 2/2] BATCH-1934: Fixed links within sample's index --- spring-batch-samples/src/site/apt/index.apt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-batch-samples/src/site/apt/index.apt b/spring-batch-samples/src/site/apt/index.apt index 5f1d323fe..daf979fd4 100644 --- a/spring-batch-samples/src/site/apt/index.apt +++ b/spring-batch-samples/src/site/apt/index.apt @@ -186,11 +186,11 @@ multiResource |x | | | | | | |x | | | |x | one place, since it contains a static constant value (<<>>) which is used to configure the query for the writer. -* Amqp Job Sample ({AmqpJobFunctionalTest}) +* Amqp Job Sample ({AmqpJobFunctionalTests}) This sample shows the use of Spring Batch to write to an <<>>. 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. + 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.