update docos for 2.1 release
This commit is contained in:
@@ -43,7 +43,7 @@ public class XStreamExecutionContextStringSerializerTests {
|
||||
public void testComplexObject() {
|
||||
Map<String, Object> m1 = new HashMap<String, Object>();
|
||||
ComplexObject o1 = new ComplexObject();
|
||||
o1.setName("Test");
|
||||
o1.setName("02345");
|
||||
Map<String, Object> m = new HashMap<String, Object>();
|
||||
m.put("object1", Long.valueOf(12345L));
|
||||
m.put("object2", "OBJECT TWO");
|
||||
@@ -131,5 +131,11 @@ public class XStreamExecutionContextStringSerializerTests {
|
||||
result = 31 * result + (map != null ? map.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComplexObject [name=" + name + ", number=" + number + "]";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
* Tests for the behavior of TaskletStep in a failure scenario.
|
||||
*
|
||||
* @author Lucas Ward
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class TaskletStepExceptionTests {
|
||||
@@ -199,6 +200,7 @@ public class TaskletStepExceptionTests {
|
||||
protected void doCommit(DefaultTransactionStatus status) throws TransactionException {
|
||||
throw new RuntimeException("bar");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doRollback(DefaultTransactionStatus status) throws TransactionException {
|
||||
throw new RuntimeException("foo");
|
||||
@@ -219,6 +221,44 @@ public class TaskletStepExceptionTests {
|
||||
assertEquals("foo", e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRepositoryError() throws Exception {
|
||||
|
||||
taskletStep.setTasklet(new Tasklet() {
|
||||
|
||||
public RepeatStatus execute(StepContribution contribution, ChunkContext attributes) throws Exception {
|
||||
return RepeatStatus.FINISHED;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
jobRepository.setFailOnUpdate(true);
|
||||
taskletStep.execute(stepExecution);
|
||||
assertEquals(UNKNOWN, stepExecution.getStatus());
|
||||
Throwable e = stepExecution.getFailureExceptions().get(0);
|
||||
assertEquals("Expected exception in step execution context persistence", e.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRepositoryErrorOnFailure() throws Exception {
|
||||
|
||||
taskletStep.setTasklet(new Tasklet() {
|
||||
|
||||
public RepeatStatus execute(StepContribution contribution, ChunkContext attributes) throws Exception {
|
||||
throw new RuntimeException("Tasklet exception");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
jobRepository.setFailOnUpdate(true);
|
||||
taskletStep.execute(stepExecution);
|
||||
assertEquals(UNKNOWN, stepExecution.getStatus());
|
||||
Throwable e = stepExecution.getFailureExceptions().get(0);
|
||||
assertEquals("Expected exception in step execution context persistence", e.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateError() throws Exception {
|
||||
|
||||
@@ -261,6 +301,12 @@ public class TaskletStepExceptionTests {
|
||||
|
||||
private int updateCount = 0;
|
||||
|
||||
private boolean failOnUpdate = false;
|
||||
|
||||
public void setFailOnUpdate(boolean failOnUpdate) {
|
||||
this.failOnUpdate = failOnUpdate;
|
||||
}
|
||||
|
||||
public void add(StepExecution stepExecution) {
|
||||
}
|
||||
|
||||
@@ -289,6 +335,9 @@ public class TaskletStepExceptionTests {
|
||||
}
|
||||
|
||||
public void updateExecutionContext(StepExecution stepExecution) {
|
||||
if (failOnUpdate) {
|
||||
throw new RuntimeException("Expected exception in step execution context persistence");
|
||||
}
|
||||
}
|
||||
|
||||
public int getUpdateCount() {
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
<artifactId>spring-batch-parent</artifactId>
|
||||
<version>2.1.0.CI-SNAPSHOT</version>
|
||||
<name>Spring Batch Parent</name>
|
||||
<description>Spring Batch parent project. Defines dependencies and common configuration for the
|
||||
build process.</description>
|
||||
<description>Spring Batch parent project. Defines dependencies and common configuration for the build process.</description>
|
||||
<url>http://static.springframework.org/spring-batch/${project.artifactId}</url>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
@@ -406,7 +405,7 @@
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jettison</groupId>
|
||||
<artifactId>jettison</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>stax</groupId>
|
||||
|
||||
34
src/site/apt/migration/2.1.0.RC1-2.1.0.apt
Executable file
34
src/site/apt/migration/2.1.0.RC1-2.1.0.apt
Executable file
@@ -0,0 +1,34 @@
|
||||
Spring Batch 2.1.0 Release Notes
|
||||
|
||||
* Bug
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1490}[BATCH-1490]}} - StaxEventItemWriter outputs invalid xml if step handling is failed and retried when handling the first chunk of data
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1494}[BATCH-1494]}} - FetchSize not accessible in HibernateCursorItemReader
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1497}[BATCH-1497]}} - SqlServerPagingQueryProvider should use an alias for the inner query in a jump-to-item query
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1498}[BATCH-1498]}} - JdbcPagingItemReader does not apply parameter values correctly on restart
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1499}[BATCH-1499]}} - SqlServerPagingQueryProvider needs an alias in the jump to subquery
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1502}[BATCH-1502]}} - HibernatePagingItemReader doesn't close sessions
|
||||
|
||||
* Improvement
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1402}[BATCH-1402]}} - MapJobRegistry throws DuplicateJobException when the same job factory instance is registered twice
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1493}[BATCH-1493]}} - Step listeners detected and invoked twice
|
||||
|
||||
* New Feature
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1496}[BATCH-1496]}} - Expose retry-policy in namespace configuration
|
||||
|
||||
* Refactoring
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1393}[BATCH-1393]}} - Migrate StepScope to Spring 3.0.0
|
||||
|
||||
* Task
|
||||
|
||||
* {{{http://jira.springsource.org/browse/BATCH-1488}[BATCH-1488]}} - Tests and documentation for StoredProcedureItemReader
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
|
||||
Links:
|
||||
|
||||
* {{{2.1.0.RC1-2.1.0.html}2.1.0.RC1 to 2.1.0}}
|
||||
|
||||
* {{{2.1.0.M4-2.1.0.RC1.html}2.1.0.M4 to 2.1.0.RC1}}
|
||||
|
||||
* {{{2.1.0.M3-2.1.0.M4.html}2.1.0.M3 to 2.1.0.M4}}
|
||||
|
||||
* {{{2.1.0.M2-2.1.0.M3.html}2.1.0.M2 to 2.1.0.M3}}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<bookinfo>
|
||||
<title>Spring Batch - Reference Documentation</title>
|
||||
|
||||
<releaseinfo>Spring Batch 2.1.0.RC1</releaseinfo>
|
||||
<releaseinfo>Spring Batch 2.1.0</releaseinfo>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
|
||||
@@ -1522,7 +1522,7 @@ itemWriter.write(items);</programlisting>
|
||||
<step id="step4" parent="s4"/></programlisting>
|
||||
</section>
|
||||
|
||||
<section id="split-flows">
|
||||
<section id="external-flows">
|
||||
<title>Externalizing Flow Definitions and Dependencies Between
|
||||
Jobs</title>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user