BATCH-1181: Changed <chunk-tasklet/> to <chunk/>
This commit is contained in:
@@ -53,7 +53,7 @@ public abstract class AbstractStepParser {
|
||||
|
||||
private static final String TASKLET_ELE = "tasklet";
|
||||
|
||||
private static final String CHUNK_TASKLET_ELE = "chunk-tasklet";
|
||||
private static final String CHUNK_ELE = "chunk";
|
||||
|
||||
private static final String LISTENERS_ELE = "listeners";
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class AbstractStepParser {
|
||||
|
||||
private static final String JOB_REPO_ATTR = "job-repository";
|
||||
|
||||
private static final ChunkTaskletParser chunkTaskletParser = new ChunkTaskletParser();
|
||||
private static final ChunkElementParser chunkTaskletParser = new ChunkElementParser();
|
||||
|
||||
private static final StepListenerParser stepListenerParser = new StepListenerParser();
|
||||
|
||||
@@ -109,11 +109,11 @@ public abstract class AbstractStepParser {
|
||||
String taskletRef = taskletElement.getAttribute(TASKLET_REF_ATTR);
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> chunkTaskletElements = (List<Element>) DomUtils.getChildElementsByTagName(taskletElement,
|
||||
CHUNK_TASKLET_ELE);
|
||||
CHUNK_ELE);
|
||||
if (StringUtils.hasText(taskletRef)) {
|
||||
if (chunkTaskletElements.size() > 0) {
|
||||
parserContext.getReaderContext().error(
|
||||
"The <" + CHUNK_TASKLET_ELE + "/> element can't be combined with the '" + TASKLET_REF_ATTR
|
||||
"The <" + CHUNK_ELE + "/> element can't be combined with the '" + TASKLET_REF_ATTR
|
||||
+ "=\"" + taskletRef + "\"' attribute specification for <"
|
||||
+ taskletElement.getNodeName() + "/>", taskletElement);
|
||||
}
|
||||
@@ -124,12 +124,12 @@ public abstract class AbstractStepParser {
|
||||
}
|
||||
else if (chunkTaskletElements.size() > 1) {
|
||||
parserContext.getReaderContext().error(
|
||||
"The '<" + CHUNK_TASKLET_ELE + "/>' element may not appear more than once in a single <"
|
||||
"The '<" + CHUNK_ELE + "/>' element may not appear more than once in a single <"
|
||||
+ taskletElement.getNodeName() + "/>.", taskletElement);
|
||||
}
|
||||
else if (!stepUnderspecified) {
|
||||
parserContext.getReaderContext().error(
|
||||
"Step [" + taskletElement.getAttribute(ID_ATTR) + "] has neither a <" + CHUNK_TASKLET_ELE
|
||||
"Step [" + taskletElement.getAttribute(ID_ATTR) + "] has neither a <" + CHUNK_ELE
|
||||
+ "/> element nor a '" + TASKLET_REF_ATTR + "' attribute.", taskletElement);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
|
||||
/**
|
||||
* Internal parser for the <chunk-tasklet/> element either inside a step.
|
||||
* Internal parser for the <chunk/> element inside a step.
|
||||
*
|
||||
* @author Thomas Risberg
|
||||
* @since 2.0
|
||||
*/
|
||||
public class ChunkTaskletParser {
|
||||
public class ChunkElementParser {
|
||||
|
||||
private static final String ID_ATTR = "id";
|
||||
|
||||
@@ -137,7 +137,7 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
|
||||
public final Object getObject() throws Exception {
|
||||
if (hasChunkTaskletElement) {
|
||||
Assert.isNull(tasklet, "Step [" + name
|
||||
+ "] has both a <chunk-tasklet/> element and a 'ref' attribute referencing a Tasklet.");
|
||||
+ "] has both a <chunk/> element and a 'ref' attribute referencing a Tasklet.");
|
||||
|
||||
if (isFaultTolerant()) {
|
||||
FaultTolerantStepFactoryBean<I, O> fb = new FaultTolerantStepFactoryBean<I, O>();
|
||||
@@ -159,7 +159,7 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
|
||||
}
|
||||
else {
|
||||
throw new IllegalStateException("Step [" + name
|
||||
+ "] has neither a <chunk-tasklet/> element nor a 'ref' attribute referencing a Tasklet.");
|
||||
+ "] has neither a <chunk/> element nor a 'ref' attribute referencing a Tasklet.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<xsd:documentation>
|
||||
Defines a stage in job processing backed by a
|
||||
Step. The id attribute must be specified. The
|
||||
step requires either a chunk-tasklet definition,
|
||||
step requires either a chunk definition,
|
||||
a tasklet reference, or a reference to a
|
||||
(possibly abstract) parent step.
|
||||
</xsd:documentation>
|
||||
@@ -265,7 +265,7 @@
|
||||
|
||||
<xsd:complexType name="taskletType">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="chunk-tasklet" type="chunkTaskletType" />
|
||||
<xsd:element name="chunk" type="chunkTaskletType" />
|
||||
<xsd:element name="transaction-attributes" type="transaction-attributesType" />
|
||||
<xsd:element name="no-rollback-exception-classes">
|
||||
<xsd:annotation>
|
||||
|
||||
@@ -41,15 +41,15 @@ import org.springframework.test.util.ReflectionTestUtils;
|
||||
* @author Dan Garrette
|
||||
* @since 2.0
|
||||
*/
|
||||
public class ChunkTaskletParserTests {
|
||||
public class ChunkElementParserTests {
|
||||
|
||||
private ConfigurableApplicationContext chunkTaskletParentAttributeParserTestsContext = new ClassPathXmlApplicationContext(
|
||||
"org/springframework/batch/core/configuration/xml/ChunkTaskletParentAttributeParserTests-context.xml");
|
||||
private ConfigurableApplicationContext chunkElementParentAttributeParserTestsContext = new ClassPathXmlApplicationContext(
|
||||
"org/springframework/batch/core/configuration/xml/ChunkElementParentAttributeParserTests-context.xml");
|
||||
|
||||
@Test
|
||||
public void testInheritSkippable() throws Exception {
|
||||
Collection<Class<?>> skippable = getExceptionClasses("s1", "skippable",
|
||||
chunkTaskletParentAttributeParserTestsContext);
|
||||
chunkElementParentAttributeParserTestsContext);
|
||||
assertEquals(2, skippable.size());
|
||||
boolean e = false;
|
||||
boolean f = false;
|
||||
@@ -67,7 +67,7 @@ public class ChunkTaskletParserTests {
|
||||
|
||||
@Test
|
||||
public void testInheritFatal() throws Exception {
|
||||
Collection<Class<?>> fatal = getExceptionClasses("s1", "fatal", chunkTaskletParentAttributeParserTestsContext);
|
||||
Collection<Class<?>> fatal = getExceptionClasses("s1", "fatal", chunkElementParentAttributeParserTestsContext);
|
||||
boolean a = false;
|
||||
boolean b = false;
|
||||
for (Class<?> cls : fatal) {
|
||||
@@ -84,7 +84,7 @@ public class ChunkTaskletParserTests {
|
||||
|
||||
@Test
|
||||
public void testInheritStreams() throws Exception {
|
||||
Collection<ItemStream> streams = getStreams("s1", chunkTaskletParentAttributeParserTestsContext);
|
||||
Collection<ItemStream> streams = getStreams("s1", chunkElementParentAttributeParserTestsContext);
|
||||
assertEquals(2, streams.size());
|
||||
boolean c = false;
|
||||
for (ItemStream o : streams) {
|
||||
@@ -98,7 +98,7 @@ public class ChunkTaskletParserTests {
|
||||
@Test
|
||||
public void testInheritRetryListeners() throws Exception {
|
||||
Collection<RetryListener> retryListeners = getRetryListeners("s1",
|
||||
chunkTaskletParentAttributeParserTestsContext);
|
||||
chunkElementParentAttributeParserTestsContext);
|
||||
assertEquals(2, retryListeners.size());
|
||||
boolean g = false;
|
||||
boolean h = false;
|
||||
@@ -117,7 +117,7 @@ public class ChunkTaskletParserTests {
|
||||
@Test
|
||||
public void testInheritSkippable_NoMerge() throws Exception {
|
||||
Collection<Class<?>> skippable = getExceptionClasses("s2", "skippable",
|
||||
chunkTaskletParentAttributeParserTestsContext);
|
||||
chunkElementParentAttributeParserTestsContext);
|
||||
assertEquals(1, skippable.size());
|
||||
boolean e = false;
|
||||
for (Class<?> cls : skippable) {
|
||||
@@ -130,7 +130,7 @@ public class ChunkTaskletParserTests {
|
||||
|
||||
@Test
|
||||
public void testInheritFatal_NoMerge() throws Exception {
|
||||
Collection<Class<?>> fatal = getExceptionClasses("s2", "fatal", chunkTaskletParentAttributeParserTestsContext);
|
||||
Collection<Class<?>> fatal = getExceptionClasses("s2", "fatal", chunkElementParentAttributeParserTestsContext);
|
||||
boolean a = false;
|
||||
boolean b = false;
|
||||
for (Class<?> cls : fatal) {
|
||||
@@ -147,7 +147,7 @@ public class ChunkTaskletParserTests {
|
||||
|
||||
@Test
|
||||
public void testInheritStreams_NoMerge() throws Exception {
|
||||
Collection<ItemStream> streams = getStreams("s2", chunkTaskletParentAttributeParserTestsContext);
|
||||
Collection<ItemStream> streams = getStreams("s2", chunkElementParentAttributeParserTestsContext);
|
||||
assertEquals(1, streams.size());
|
||||
boolean c = false;
|
||||
for (ItemStream o : streams) {
|
||||
@@ -161,7 +161,7 @@ public class ChunkTaskletParserTests {
|
||||
@Test
|
||||
public void testInheritRetryListeners_NoMerge() throws Exception {
|
||||
Collection<RetryListener> retryListeners = getRetryListeners("s2",
|
||||
chunkTaskletParentAttributeParserTestsContext);
|
||||
chunkElementParentAttributeParserTestsContext);
|
||||
assertEquals(1, retryListeners.size());
|
||||
boolean h = false;
|
||||
for (RetryListener o : retryListeners) {
|
||||
@@ -9,7 +9,7 @@
|
||||
<job id="job">
|
||||
<step id="s1" parent="baseStep">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="5" skip-limit="5">
|
||||
<chunk reader="reader" writer="writer" commit-interval="5" skip-limit="5">
|
||||
<skippable-exception-classes merge="true">
|
||||
java.lang.NullPointerException
|
||||
</skippable-exception-classes>
|
||||
@@ -22,13 +22,13 @@
|
||||
<retry-listeners merge="true">
|
||||
<listener class="org.springframework.batch.core.configuration.xml.DummyRetryListener"/>
|
||||
</retry-listeners>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
|
||||
<step id="s2" parent="baseStep">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="5" skip-limit="5">
|
||||
<chunk reader="reader" writer="writer" commit-interval="5" skip-limit="5">
|
||||
<skippable-exception-classes>
|
||||
java.lang.NullPointerException
|
||||
</skippable-exception-classes>
|
||||
@@ -41,14 +41,14 @@
|
||||
<retry-listeners>
|
||||
<listener class="org.springframework.batch.core.configuration.xml.DummyRetryListener"/>
|
||||
</retry-listeners>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
<step id="baseStep" abstract="true">
|
||||
<tasklet>
|
||||
<chunk-tasklet>
|
||||
<chunk>
|
||||
<skippable-exception-classes>
|
||||
java.lang.ArithmeticException
|
||||
</skippable-exception-classes>
|
||||
@@ -61,7 +61,7 @@
|
||||
<retry-listeners>
|
||||
<listener class="org.springframework.batch.retry.listener.RetryListenerSupport"/>
|
||||
</retry-listeners>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<job id="job">
|
||||
<step id="step">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" processor="processor" writer="writer" commit-interval="10" skip-limit="20"
|
||||
retry-limit="3" cache-capacity="100" is-reader-transactional-queue="true"
|
||||
task-executor="taskExecutor">
|
||||
<chunk reader="reader" processor="processor" writer="writer" commit-interval="10" skip-limit="20"
|
||||
retry-limit="3" cache-capacity="100" is-reader-transactional-queue="true"
|
||||
task-executor="taskExecutor">
|
||||
<retry-listeners>
|
||||
<listener class="org.springframework.batch.core.configuration.xml.TestRetryListener" ref="retryListener" />
|
||||
</retry-listeners>
|
||||
@@ -21,7 +21,7 @@
|
||||
<skippable-exception-classes>
|
||||
org.springframework.dao.DataIntegrityViolationException,
|
||||
</skippable-exception-classes>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" timeout="10" />
|
||||
<no-rollback-exception-classes>
|
||||
org.springframework.dao.DataIntegrityViolationException
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<job id="job">
|
||||
<step id="s1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer"
|
||||
commit-interval="25" chunk-completion-policy="completionPolicy"/>
|
||||
<chunk reader="reader" writer="writer"
|
||||
commit-interval="25" chunk-completion-policy="completionPolicy"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<job id="job">
|
||||
<step id="s1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="25"/>
|
||||
<chunk reader="reader" writer="writer" commit-interval="25"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<job id="job">
|
||||
<step id="s1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" chunk-completion-policy="completionPolicy"/>
|
||||
<chunk reader="reader" writer="writer" chunk-completion-policy="completionPolicy"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<job id="job">
|
||||
<step id="s1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer"/>
|
||||
<chunk reader="reader" writer="writer"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<job id="job">
|
||||
<step id="s1" parent="baseStep" next="s2">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="5" />
|
||||
<chunk reader="reader" writer="writer" commit-interval="5" />
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" />
|
||||
</tasklet>
|
||||
</step>
|
||||
@@ -22,7 +22,7 @@
|
||||
<step id="s4" parent="standalone4" next="s5" />
|
||||
<step id="s5" parent="baseStep" next="s6">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="5" />
|
||||
<chunk reader="reader" writer="writer" commit-interval="5" />
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" />
|
||||
</tasklet>
|
||||
</step>
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<step id="standalone2" parent="baseStep">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="5" />
|
||||
<chunk reader="reader" writer="writer" commit-interval="5" />
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" />
|
||||
</tasklet>
|
||||
</step>
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<step id="standalone6" parent="baseStep">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="5" />
|
||||
<chunk reader="reader" writer="writer" commit-interval="5" />
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" />
|
||||
</tasklet>
|
||||
</step>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<job id="job">
|
||||
<step id="step">
|
||||
<tasklet start-limit="25" allow-start-if-complete="true">
|
||||
<chunk-tasklet reader="reader" processor="processor" writer="writer" commit-interval="10" skip-limit="20"
|
||||
retry-limit="3" cache-capacity="100" is-reader-transactional-queue="true"
|
||||
task-executor="taskExecutor">
|
||||
<chunk reader="reader" processor="processor" writer="writer" commit-interval="10" skip-limit="20"
|
||||
retry-limit="3" cache-capacity="100" is-reader-transactional-queue="true"
|
||||
task-executor="taskExecutor">
|
||||
<retry-listeners>
|
||||
<listener class="org.springframework.batch.core.configuration.xml.TestRetryListener" />
|
||||
</retry-listeners>
|
||||
@@ -22,7 +22,7 @@
|
||||
<skippable-exception-classes>
|
||||
org.springframework.dao.DataIntegrityViolationException
|
||||
</skippable-exception-classes>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" timeout="10" />
|
||||
<no-rollback-exception-classes>
|
||||
org.springframework.dao.DataIntegrityViolationException
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<job id="job">
|
||||
<step id="ft-step">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" processor="processor" writer="writer"
|
||||
commit-interval="10">
|
||||
<chunk reader="reader" processor="processor" writer="writer"
|
||||
commit-interval="10">
|
||||
<streams>
|
||||
<stream ref="reader"/>
|
||||
</streams>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
<listeners>
|
||||
<listener class="org.springframework.batch.core.configuration.xml.TestListener"
|
||||
after-step-method="destroy"/>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<job id="job">
|
||||
<step id="step">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" processor="processor" writer="writer" commit-interval="10" skip-limit="20"
|
||||
retry-limit="3" cache-capacity="100" is-reader-transactional-queue="true" task-executor="taskExecutor">
|
||||
<chunk reader="reader" processor="processor" writer="writer" commit-interval="10" skip-limit="20"
|
||||
retry-limit="3" cache-capacity="100" is-reader-transactional-queue="true" task-executor="taskExecutor">
|
||||
<retry-listeners>
|
||||
<listener ref="retryListener" />
|
||||
<listener class="org.springframework.batch.core.configuration.xml.TestRetryListener" />
|
||||
@@ -21,7 +21,7 @@
|
||||
<skippable-exception-classes>
|
||||
org.springframework.dao.DataIntegrityViolationException
|
||||
</skippable-exception-classes>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
<transaction-attributes propagation="REQUIRED" isolation="DEFAULT" timeout="10" />
|
||||
<no-rollback-exception-classes>
|
||||
org.springframework.dao.DataIntegrityViolationException
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<job id="loopJob" incrementer="jobParametersIncrementer">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="3"/>
|
||||
<chunk reader="reader" writer="writer" commit-interval="3"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -11,13 +11,14 @@
|
||||
<job id="beanWrapperMapperJob">
|
||||
<step id="step1" next="step2">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="tradeFileItemReader" processor="processor" writer="tradeWriter"
|
||||
commit-interval="1"/>
|
||||
<chunk reader="tradeFileItemReader" processor="processor" writer="tradeWriter"
|
||||
commit-interval="1"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="step2">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="personFileItemReader" writer="personWriter" commit-interval="1"/>
|
||||
<chunk reader="personFileItemReader" writer="personWriter"
|
||||
commit-interval="1"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
<job id="compositeItemWriterJob">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="fileItemReader" processor="processor" writer="compositeWriter"
|
||||
commit-interval="1">
|
||||
<chunk reader="fileItemReader" processor="processor" writer="compositeWriter"
|
||||
commit-interval="1">
|
||||
<streams>
|
||||
<stream ref="fileItemReader"/>
|
||||
<stream ref="fileItemWriter1"/>
|
||||
<stream ref="fileItemWriter2"/>
|
||||
</streams>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<job id="customerFilterJob">
|
||||
<step id="uploadCustomer">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="customerFileUploadReader"
|
||||
processor="customerUpdateProcessor"
|
||||
writer="customerUpdateWriter"
|
||||
commit-interval="1"/>
|
||||
<chunk reader="customerFileUploadReader"
|
||||
processor="customerUpdateProcessor"
|
||||
writer="customerUpdateWriter"
|
||||
commit-interval="1"/>
|
||||
<listeners>
|
||||
<listener ref="customerTokenizer"/>
|
||||
</listeners>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<job id="delegateJob">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="1"/>
|
||||
<chunk reader="reader" writer="writer" commit-interval="1"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<job id="footballJob">
|
||||
<step id="playerload" next="gameLoad">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="playerFileItemReader" writer="playerWriter"
|
||||
commit-interval="${job.commit.interval}" />
|
||||
<chunk reader="playerFileItemReader" writer="playerWriter"
|
||||
commit-interval="${job.commit.interval}" />
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="gameLoad" next="playerSummarization">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="gameFileItemReader" writer="gameWriter"
|
||||
commit-interval="${job.commit.interval}" />
|
||||
<chunk reader="gameFileItemReader" writer="gameWriter"
|
||||
commit-interval="${job.commit.interval}" />
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="playerSummarization" parent="summarizationStep" />
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
<step id="summarizationStep">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="playerSummarizationSource" writer="summaryWriter"
|
||||
commit-interval="${job.commit.interval}" />
|
||||
<chunk reader="playerSummarizationSource" writer="summaryWriter"
|
||||
commit-interval="${job.commit.interval}" />
|
||||
</tasklet>
|
||||
</step>
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<job id="headerFooterSample">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" writer="writer" commit-interval="3">
|
||||
<chunk reader="reader" writer="writer" commit-interval="3">
|
||||
<streams>
|
||||
<stream ref="reader"/>
|
||||
<stream ref="writer"/>
|
||||
</streams>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
<listeners>
|
||||
<listener ref="footerCallback"/>
|
||||
</listeners>
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
<job id="hibernateJob" restartable="false">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="hibernateItemReader"
|
||||
processor="creditIncreaseProcessor"
|
||||
writer="hibernateCreditWriter"
|
||||
skip-limit="5"
|
||||
commit-interval="3"/>
|
||||
<chunk reader="hibernateItemReader"
|
||||
processor="creditIncreaseProcessor"
|
||||
writer="hibernateCreditWriter"
|
||||
skip-limit="5"
|
||||
commit-interval="3"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<job id="ioSampleJob">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="itemReader" processor="itemProcessor" writer="itemWriter" commit-interval="2"/>
|
||||
<chunk reader="itemReader" processor="itemProcessor" writer="itemWriter" commit-interval="2"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<batch:job id="ioSampleJob">
|
||||
<batch:step id="step1">
|
||||
<batch:tasklet>
|
||||
<batch:chunk-tasklet reader="itemReader" writer="itemWriter" commit-interval="2"/>
|
||||
<batch:chunk reader="itemReader" writer="itemWriter" commit-interval="2"/>
|
||||
</batch:tasklet>
|
||||
</batch:step>
|
||||
</batch:job>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<batch:job id="ioSampleJob">
|
||||
<batch:step id="step1">
|
||||
<batch:tasklet>
|
||||
<batch:chunk-tasklet reader="itemReader" writer="itemWriter" commit-interval="2"/>
|
||||
<batch:chunk reader="itemReader" writer="itemWriter" commit-interval="2"/>
|
||||
</batch:tasklet>
|
||||
</batch:step>
|
||||
</batch:job>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<job id="loopFlowSample">
|
||||
<step id="step1" next="step2">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="itemGenerator" writer="itemWriter" commit-interval="1"/>
|
||||
<chunk reader="itemGenerator" writer="itemWriter" commit-interval="1"/>
|
||||
<listeners>
|
||||
<listener ref="resettingListener"/>
|
||||
</listeners>
|
||||
@@ -22,7 +22,7 @@
|
||||
</step>
|
||||
<step id="step2" next="limitDecision">
|
||||
<tasklet allow-start-if-complete="true">
|
||||
<chunk-tasklet reader="itemGenerator" writer="itemWriter" commit-interval="1"/>
|
||||
<chunk reader="itemGenerator" writer="itemWriter" commit-interval="1"/>
|
||||
<listeners>
|
||||
<listener ref="resettingListener"/>
|
||||
</listeners>
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
<batch:job id="multilineJob">
|
||||
<batch:step id="step1">
|
||||
<batch:tasklet>
|
||||
<batch:chunk-tasklet reader="reader" writer="writer" commit-interval="1">
|
||||
<batch:chunk reader="reader" writer="writer" commit-interval="1">
|
||||
<batch:streams>
|
||||
<batch:stream ref="fileItemReader"/>
|
||||
</batch:streams>
|
||||
</batch:chunk-tasklet>
|
||||
</batch:chunk>
|
||||
</batch:tasklet>
|
||||
</batch:step>
|
||||
</batch:job>
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<job id="multilineOrderJob">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="reader" processor="processor" writer="fileItemWriter" commit-interval="5">
|
||||
<chunk reader="reader" processor="processor" writer="fileItemWriter" commit-interval="5">
|
||||
<streams>
|
||||
<stream ref="fileItemWriter"/>
|
||||
<stream ref="fileItemReader"/>
|
||||
</streams>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
<job id="parallelJob">
|
||||
<step id="staging" next="loading">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="fileItemReader"
|
||||
processor="validatingProcessor"
|
||||
writer="stagingItemWriter"
|
||||
commit-interval="2"/>
|
||||
<chunk reader="fileItemReader"
|
||||
processor="validatingProcessor"
|
||||
writer="stagingItemWriter"
|
||||
commit-interval="2"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="loading">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="stagingReader"
|
||||
processor="stagingProcessor"
|
||||
writer="tradeWriter"
|
||||
commit-interval="1"
|
||||
task-executor="taskExecutor"/>
|
||||
<chunk reader="stagingReader"
|
||||
processor="stagingProcessor"
|
||||
writer="tradeWriter"
|
||||
commit-interval="1"
|
||||
task-executor="taskExecutor"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<batch:step id="step1">
|
||||
<batch:tasklet job-repository="jobRepository" transaction-manager="transactionManager">
|
||||
<batch:chunk-tasklet writer="itemWriter" reader="itemReader" processor="itemProcessor" commit-interval="5" />
|
||||
<batch:chunk writer="itemWriter" reader="itemReader" processor="itemProcessor" commit-interval="5" />
|
||||
<batch:listeners>
|
||||
<batch:listener ref="fileNameListener" />
|
||||
</batch:listeners>
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
<job id="restartSampleJob" restartable="true">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="itemReader" processor="processor" writer="tradeWriter" commit-interval="2">
|
||||
<chunk reader="itemReader" processor="processor" writer="tradeWriter" commit-interval="2">
|
||||
<streams>
|
||||
<stream ref="fileItemReader" />
|
||||
</streams>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<job id="retrySample">
|
||||
<step id="step1">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="itemGenerator"
|
||||
writer="itemWriter"
|
||||
commit-interval="1"
|
||||
retry-limit="3">
|
||||
<chunk reader="itemGenerator"
|
||||
writer="itemWriter"
|
||||
commit-interval="1"
|
||||
retry-limit="3">
|
||||
<retryable-exception-classes>
|
||||
java.lang.Exception
|
||||
</retryable-exception-classes>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<job id="skipJob" incrementer="incrementer">
|
||||
<step id="step1" parent="baseStep">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="fileItemReader" processor="tradeProcessor" writer="tradeWriter"
|
||||
commit-interval="3" skip-limit="10">
|
||||
</chunk-tasklet>
|
||||
<chunk reader="fileItemReader" processor="tradeProcessor" writer="tradeWriter"
|
||||
commit-interval="3" skip-limit="10">
|
||||
</chunk>
|
||||
</tasklet>
|
||||
|
||||
<next on="*" to="step2" />
|
||||
@@ -44,11 +44,11 @@
|
||||
|
||||
<step id="secondPass" parent="t2">
|
||||
<tasklet>
|
||||
<chunk-tasklet writer="itemTrackingWriter">
|
||||
<chunk writer="itemTrackingWriter">
|
||||
<skippable-exception-classes merge="true">
|
||||
java.lang.RuntimeException
|
||||
</skippable-exception-classes>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
|
||||
@@ -56,12 +56,12 @@
|
||||
|
||||
<step id="t3" parent="baseStep" abstract="true">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="tradeSqlItemReader" processor="tradeProcessor" writer="dummyWriter"
|
||||
commit-interval="2" skip-limit="10">
|
||||
<chunk reader="tradeSqlItemReader" processor="tradeProcessor" writer="dummyWriter"
|
||||
commit-interval="2" skip-limit="10">
|
||||
<skippable-exception-classes>
|
||||
org.springframework.batch.item.validator.ValidationException
|
||||
</skippable-exception-classes>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
</tasklet>
|
||||
</step>
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@
|
||||
<job id="tradeJob">
|
||||
<step id="step1" next="step2">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="fileItemReader" processor="validatingProcessor" writer="tradeWriter"
|
||||
commit-interval="1">
|
||||
<chunk reader="fileItemReader" processor="validatingProcessor" writer="tradeWriter"
|
||||
commit-interval="1">
|
||||
<streams>
|
||||
<stream ref="fileItemReader" />
|
||||
</streams>
|
||||
</chunk-tasklet>
|
||||
</chunk>
|
||||
<transaction-attributes isolation="READ_COMMITTED" />
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="step2" next="step3">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="tradeSqlItemReader" writer="customerWriter" commit-interval="1" />
|
||||
<chunk reader="tradeSqlItemReader" writer="customerWriter" commit-interval="1" />
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="step3">
|
||||
<tasklet>
|
||||
<chunk-tasklet reader="customerSqlItemReader" writer="creditWriter" commit-interval="1" />
|
||||
<chunk reader="customerSqlItemReader" writer="creditWriter" commit-interval="1" />
|
||||
</tasklet>
|
||||
</step>
|
||||
</job>
|
||||
|
||||
Reference in New Issue
Block a user