diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParser.java index b8234daf4..459c025af 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParser.java @@ -70,16 +70,16 @@ public class StepParser { String stepRef = element.getAttribute("name"); @SuppressWarnings("unchecked") - List taskElements = (List) DomUtils.getChildElementsByTagName(element, "task"); + List simpleTaskElements = (List) DomUtils.getChildElementsByTagName(element, "simple-task"); @SuppressWarnings("unchecked") - List chunkElements = (List) DomUtils.getChildElementsByTagName(element, "chunk"); - if (taskElements.size() > 0) { - Object task = parseTask(taskElements.get(0), parserContext); + List processTaskElements = (List) DomUtils.getChildElementsByTagName(element, "process-task"); + if (simpleTaskElements.size() > 0) { + Object task = parseSimpleTask(simpleTaskElements.get(0), parserContext); stateBuilder.addConstructorArgValue(stepRef); stateBuilder.addConstructorArgValue(task); } - else if (chunkElements.size() > 0) { - Object task = parseChunk(chunkElements.get(0), parserContext); + else if (processTaskElements.size() > 0) { + Object task = parseProcessTask(processTaskElements.get(0), parserContext); stateBuilder.addConstructorArgValue(stepRef); stateBuilder.addConstructorArgValue(task); } @@ -196,7 +196,7 @@ public class StepParser { * @param parserContext * @return the TaskletStep bean */ - protected RootBeanDefinition parseChunk(Element element, ParserContext parserContext) { + protected RootBeanDefinition parseProcessTask(Element element, ParserContext parserContext) { RootBeanDefinition bd; @@ -237,7 +237,7 @@ public class StepParser { RuntimeBeanReference tx = new RuntimeBeanReference(transactionManager); bd.getPropertyValues().addPropertyValue("transactionManager", tx); - String commitInterval = element.getAttribute("chunk-size"); + String commitInterval = element.getAttribute("commit-interval"); if (StringUtils.hasText(commitInterval)) { bd.getPropertyValues().addPropertyValue("commitInterval", commitInterval); } @@ -374,7 +374,7 @@ public class StepParser { * @param parserContext * @return the TaskletStep bean */ - protected RootBeanDefinition parseTask(Element element, ParserContext parserContext) { + protected RootBeanDefinition parseSimpleTask(Element element, ParserContext parserContext) { RootBeanDefinition bd = new RootBeanDefinition("org.springframework.batch.core.step.tasklet.TaskletStep", null, null); diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd index 3eb398659..697f5a01d 100644 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd +++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd @@ -202,20 +202,8 @@ - - - - - - - - - - - - - - + + @@ -232,7 +220,7 @@ - + @@ -246,7 +234,7 @@ - + @@ -259,13 +247,20 @@ - - - - - - - + + + + + + + + + + + + @@ -286,6 +281,18 @@ + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + @@ -397,6 +433,18 @@ + + + + + + + + + + + + @@ -510,7 +558,7 @@ if the bean name of the desired TransactionManager is not 'transactionManager'. ]]> - ` + @@ -519,10 +567,4 @@ - - - - - - \ No newline at end of file diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithSimpleChunkJobParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithBasicProcessTaskJobParserTests.java similarity index 98% rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithSimpleChunkJobParserTests.java rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithBasicProcessTaskJobParserTests.java index 3f7965f72..ee392879e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithSimpleChunkJobParserTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithBasicProcessTaskJobParserTests.java @@ -44,7 +44,7 @@ import org.springframework.test.util.ReflectionTestUtils; */ @ContextConfiguration @RunWith(SpringJUnit4ClassRunner.class) -public class StepWithSimpleChunkJobParserTests { +public class StepWithBasicProcessTaskJobParserTests { @Autowired private Job job; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantChunkJobParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantProcessTaskJobParserTests.java similarity index 96% rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantChunkJobParserTests.java rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantProcessTaskJobParserTests.java index 55110c797..823a5b52b 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantChunkJobParserTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantProcessTaskJobParserTests.java @@ -26,7 +26,6 @@ import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; -import org.springframework.batch.core.StepExecutionListener; import org.springframework.batch.core.StepListener; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean; @@ -45,7 +44,7 @@ import org.springframework.test.util.ReflectionTestUtils; */ @ContextConfiguration @RunWith(SpringJUnit4ClassRunner.class) -public class StepWithFaultTolerantChunkJobParserTests { +public class StepWithFaultTolerantProcessTaskJobParserTests { @Autowired private Job job; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithTaskJobParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithSimpleTaskJobParserTests.java similarity index 97% rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithTaskJobParserTests.java rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithSimpleTaskJobParserTests.java index 405d89437..172912f9e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithTaskJobParserTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepWithSimpleTaskJobParserTests.java @@ -39,7 +39,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; */ @ContextConfiguration @RunWith(SpringJUnit4ClassRunner.class) -public class StepWithTaskJobParserTests { +public class StepWithSimpleTaskJobParserTests { @Autowired private Job job; diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/JobExecutionListenerParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/JobExecutionListenerParserTests-context.xml index 547e0b16c..aa36a113c 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/JobExecutionListenerParserTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/JobExecutionListenerParserTests-context.xml @@ -8,7 +8,7 @@ - + diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithSimpleChunkJobParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithBasicProcessTaskJobParserTests-context.xml similarity index 89% rename from spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithSimpleChunkJobParserTests-context.xml rename to spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithBasicProcessTaskJobParserTests-context.xml index 89f5a35e4..e92415239 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithSimpleChunkJobParserTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithBasicProcessTaskJobParserTests-context.xml @@ -8,8 +8,8 @@ - + @@ -17,7 +17,7 @@ - + diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantChunkJobParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantProcessTaskJobParserTests-context.xml similarity index 87% rename from spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantChunkJobParserTests-context.xml rename to spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantProcessTaskJobParserTests-context.xml index dd1de2c2f..d47cd3564 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantChunkJobParserTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithFaultTolerantProcessTaskJobParserTests-context.xml @@ -8,8 +8,8 @@ - + @@ -17,7 +17,7 @@ - + diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithTaskJobParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithSimpleTaskJobParserTests-context.xml similarity index 91% rename from spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithTaskJobParserTests-context.xml rename to spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithSimpleTaskJobParserTests-context.xml index d673a038f..9fab934ae 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithTaskJobParserTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepWithSimpleTaskJobParserTests-context.xml @@ -8,11 +8,11 @@ - + - +