Files
spring-batch/build/reference-epub-work/apc.xhtml
Michael Minella 75ab909314 update
2017-03-23 10:18:33 -05:00

20 lines
2.1 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg"><head><title>Appendix C. Batch Processing and Transactions</title><link rel="stylesheet" type="text/css" href="docbook-epub.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/><link rel="prev" href="apbs10.xhtml" title="Recommendations for Indexing Meta Data Tables"/><link rel="next" href="apcs02.xhtml" title="Simple Stateless Retry"/></head><body><header/><section class="appendix" title="Appendix C. Batch Processing and Transactions" epub:type="appendix" id="transactions"><div class="titlepage"><div><div><h1 class="title">Appendix C. Batch Processing and Transactions</h1></div></div></div><section class="section" title="Simple Batching with No Retry" epub:type="division" id="transactionsNoRetry"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Simple Batching with No Retry</h2></div></div></div><p>Consider the following simple example of a nested batch with no
retries. This is a very common scenario for batch processing, where
an input source is processed until exhausted, but we commit
periodically at the end of a "chunk" of processing.</p><pre class="programlisting">
1 | REPEAT(until=exhausted) {
|
2 | TX {
3 | REPEAT(size=5) {
3.1 | input;
3.2 | output;
| }
| }
|
| }
</pre><p>The input operation (3.1) could be a message-based receive
(e.g. JMS), or a file-based read, but to recover and continue
processing with a chance of completing the whole job, it must be
transactional. The same applies to the operation at (3.2) - it must
be either transactional or idempotent.</p><p>If the chunk at REPEAT(3) fails because of a database exception at
(3.2), then TX(2) will roll back the whole chunk.</p></section></section><footer/></body></html>