diff --git a/docs/src/site/docbook/reference/repeat.xml b/docs/src/site/docbook/reference/repeat.xml index 21203cdbf..cfb6ea873 100644 --- a/docs/src/site/docbook/reference/repeat.xml +++ b/docs/src/site/docbook/reference/repeat.xml @@ -24,7 +24,10 @@ as a queue or database. A common scenario when a batch job is a datastream coming from a flat file interface is to have a file or files as input sources and a database resource as the output source. In this case the - repeat templates can be used like the following: + In this batch scenario an outer RepeatTemplate initialies the continuous flow, a TransactionTemplate wraps the input and output @@ -55,22 +60,24 @@ the business processing is within the RepeatTemplates. It's only job is to keep the flow moving from the Item Provider to the Item Processor as quickly as possible. The repeat template can process records irrespective - of the batch architecture. A simple example would be: - - RepeatTemplate template = new RepeatTemplate(); - Resource resource = new FileSystemResource("resources/trades.csv"); - TradeProcessor executor = new TradeProcessor(); - TradeItemProvider provider = null; - try { - provider = new TradeItemProvider(resource); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - template.iterate(new ItemProviderRepeatCallback(provider, executor)); - - + of the batch architecture. A simple example would be: + + A RepeatTemplate has an exception policy that can be leveraged - \ No newline at end of file +