diff --git a/spring-batch-admin-parent/pom.xml b/spring-batch-admin-parent/pom.xml
index e5cb290e6..8f5414c52 100755
--- a/spring-batch-admin-parent/pom.xml
+++ b/spring-batch-admin-parent/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.springframework.batch
spring-batch-admin-parent
- 1.2.2.BUILD-SNAPSHOT
+ 1.3.0.BUILD-SNAPSHOT
Spring Batch Admin Parent
A set of services (Java, JSON) and a UI (webapp) for managing and launching Spring Batch jobs.
http://www.springsource.org/spring-batch-admin
@@ -25,12 +25,18 @@
Dave Syer
dsyer@vmware.com
+
+ mminella
+ Michael Minella
+ mminella@vmware.com
+
- true
- 2.1.7.RELEASE
- 3.0.5.RELEASE
- 2.0.3.RELEASE
+ false
+ 2.2.0.RC1
+ 3.2.1.RELEASE
+ 2.2.3.RELEASE
+ 1.0.2.RELEASE
@@ -163,7 +169,7 @@
-
org.eclipse.m2e
@@ -268,8 +274,8 @@
org.apache.maven.plugins
maven-compiler-plugin
- 1.5
- 1.5
+ 1.6
+ 1.6
diff --git a/spring-batch-integration/pom.xml b/spring-batch-integration/pom.xml
index 7b13c0211..524aef461 100644
--- a/spring-batch-integration/pom.xml
+++ b/spring-batch-integration/pom.xml
@@ -7,22 +7,25 @@
org.springframework.batch
spring-batch-admin-parent
- 1.2.2.BUILD-SNAPSHOT
+ 1.3.0.BUILD-SNAPSHOT
../spring-batch-admin-parent
org.springframework.batch
spring-batch-core
- ${spring.batch.version}
compile
org.springframework.batch
spring-batch-test
- ${spring.batch.version}
test
+
+ org.springframework.retry
+ spring-retry
+ ${spring.retry.version}
+
org.apache.geronimo.specs
geronimo-jms_1.1_spec
@@ -103,7 +106,6 @@
org.springframework.integration
spring-integration-core
- ${spring.integration.version}
compile
@@ -115,7 +117,6 @@
org.springframework.integration
spring-integration-jms
- ${spring.integration.version}
true
diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java
index 9df1b75dd..66292c5a3 100644
--- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java
+++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2007 the original author or authors.
+ * Copyright 2006-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,19 +26,20 @@ import org.springframework.batch.core.step.item.FaultTolerantChunkProcessor;
import org.springframework.batch.core.step.skip.NonSkippableReadException;
import org.springframework.batch.core.step.skip.SkipLimitExceededException;
import org.springframework.batch.core.step.skip.SkipListenerFailedException;
-import org.springframework.batch.retry.RetryException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.annotation.ServiceActivator;
+import org.springframework.retry.RetryException;
import org.springframework.util.Assert;
/**
* A {@link ChunkHandler} based on a {@link ChunkProcessor}. Knows how to distinguish between a processor that is fault
* tolerant, and one that is not. If the processor is fault tolerant then exceptions can be propagated on the assumption
* that there will be a roll back and the request will be re-delivered.
- *
+ *
* @author Dave Syer
- *
+ * @author Michael Minella
+ *
* @param the type of the items in the chunk to be handled
*/
@MessageEndpoint
@@ -50,7 +51,7 @@ public class ChunkProcessorChunkHandler implements ChunkHandler, Initializ
/*
* (non-Javadoc)
- *
+ *
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
public void afterPropertiesSet() throws Exception {
@@ -59,7 +60,7 @@ public class ChunkProcessorChunkHandler implements ChunkHandler, Initializ
/**
* Public setter for the {@link ChunkProcessor}.
- *
+ *
* @param chunkProcessor the chunkProcessor to set
*/
public void setChunkProcessor(ChunkProcessor chunkProcessor) {
@@ -67,7 +68,7 @@ public class ChunkProcessorChunkHandler implements ChunkHandler, Initializ
}
/**
- *
+ *
* @see ChunkHandler#handleChunk(ChunkRequest)
*/
@ServiceActivator
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java
index 8ab84f5be..a6f94ad56 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2007 the original author or authors.
+ * Copyright 2006-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
*/
package org.springframework.batch.integration;
+import java.util.Collection;
+
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameters;
@@ -35,7 +37,7 @@ public class JobRepositorySupport implements JobRepository {
*/
public JobExecution createJobExecution(String jobName, JobParameters jobParameters)
throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException {
- return new JobExecution(new JobInstance(0L, jobParameters, jobName));
+ return new JobExecution(new JobInstance(0L, jobName), jobParameters);
}
/* (non-Javadoc)
@@ -69,7 +71,7 @@ public class JobRepositorySupport implements JobRepository {
*/
public void updateExecutionContext(StepExecution stepExecution) {
}
-
+
public void updateExecutionContext(JobExecution jobExecution) {
}
@@ -90,5 +92,11 @@ public class JobRepositorySupport implements JobRepository {
return null;
}
-
+ public void addAll(Collection stepExecutions) {
+ if(stepExecutions != null) {
+ for (StepExecution stepExecution : stepExecutions) {
+ add(stepExecution);
+ }
+ }
+ }
}
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java
index 271469926..6dc39232d 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2007 the original author or authors.
+ * Copyright 2006-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,6 +54,7 @@ public class PollingAsyncItemProcessorMessagingGatewayTests {
public MethodRule rule = new MethodRule() {
public Statement apply(final Statement base, FrameworkMethod method, Object target) {
return new Statement() {
+ @Override
public void evaluate() throws Throwable {
StepScopeTestUtils.doInStepScope(stepExecution, new Callable() {
public Void call() throws Exception {
@@ -103,7 +104,7 @@ public class PollingAsyncItemProcessorMessagingGatewayTests {
public static class Doubler {
@ServiceActivator
- public String cat(String value, @Header(value="stepExecution.jobExecution.jobInstance.jobParameters.getLong('factor')", required=false) Integer input) {
+ public String cat(String value, @Header(value="stepExecution.jobExecution.jobParameters.getLong('factor')", required=false) Integer input) {
long factor = input==null ? 1 : input;
for (int i=1; i getSimpleMessage(String string, Long jobId) {
- StepContribution stepContribution = new JobExecution(new JobInstance(0L, new JobParameters(), "job"), 1L)
- .createStepExecution("step").createStepContribution();
+ StepContribution stepContribution = new JobExecution(new JobInstance(0L, "job"), new JobParameters())
+ .createStepExecution("step").createStepContribution();
ChunkRequest chunk = new ChunkRequest(0, StringUtils.commaDelimitedListToSet(string), jobId, stepContribution);
GenericMessage message = new GenericMessage(chunk);
return message;
@@ -240,7 +240,7 @@ public class ChunkMessageItemWriterIntegrationTests {
// Set up expectation of three messages (chunks) in the backlog
stepExecution.getExecutionContext().putInt(ChunkMessageChannelItemWriter.EXPECTED, 6);
stepExecution.getExecutionContext().putInt(ChunkMessageChannelItemWriter.ACTUAL, 3);
-
+
writer.setMaxWaitTimeouts(2);
/*
@@ -262,7 +262,7 @@ public class ChunkMessageItemWriterIntegrationTests {
/**
* This one is flakey - we try to force it to wait until after the step to
* finish processing just by waiting for long enough.
- *
+ *
* @throws Exception
*/
@Test
@@ -308,7 +308,7 @@ public class ChunkMessageItemWriterIntegrationTests {
}
private StepExecution getStepExecution(Step step) throws JobExecutionAlreadyRunningException, JobRestartException,
- JobInstanceAlreadyCompleteException {
+ JobInstanceAlreadyCompleteException {
SimpleJob job = new SimpleJob();
job.setName("job");
JobExecution jobExecution = jobRepository.createJobExecution(job.getName(), new JobParametersBuilder().addLong(
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java
index 07dc6d8a7..604168364 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java
@@ -18,6 +18,7 @@ import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.Message;
import org.springframework.integration.core.PollableChannel;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -30,23 +31,20 @@ public class RemoteChunkFaultTolerantStepJdbcIntegrationTests {
@Autowired
private Job job;
-
+
@Autowired
private PollableChannel replies;
-
- // @Autowired
- // private DataSource dataSource;
-
+
@Before
public void drain() {
Message> message = replies.receive(100L);
while (message!=null) {
- // System.err.println(message);
message = replies.receive(100L);
}
}
@Test
+ @DirtiesContext
public void testFailedStep() throws Exception {
JobExecution jobExecution = jobLauncher.run(job, new JobParameters(Collections.singletonMap("item.three",
new JobParameter("unsupported"))));
@@ -58,6 +56,7 @@ public class RemoteChunkFaultTolerantStepJdbcIntegrationTests {
}
@Test
+ @DirtiesContext
public void testFailedStepOnError() throws Exception {
JobExecution jobExecution = jobLauncher.run(job, new JobParameters(Collections.singletonMap("item.three",
new JobParameter("error"))));
@@ -69,6 +68,7 @@ public class RemoteChunkFaultTolerantStepJdbcIntegrationTests {
}
@Test
+ @DirtiesContext
public void testSunnyDayFaultTolerant() throws Exception {
JobExecution jobExecution = jobLauncher.run(job, new JobParameters(Collections.singletonMap("item.three",
new JobParameter("3"))));
@@ -79,6 +79,7 @@ public class RemoteChunkFaultTolerantStepJdbcIntegrationTests {
}
@Test
+ @DirtiesContext
public void testSkipsInWriter() throws Exception {
JobExecution jobExecution = jobLauncher.run(job, new JobParametersBuilder().addString("item.three", "fail")
.addLong("run.id", 1L).toJobParameters());
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java
index 9ab9e3783..180110462 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java
@@ -19,7 +19,7 @@ import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = { "/job-execution-context.xml" })
public class JobLaunchingMessageHandlerTests extends AbstractJUnit4SpringContextTests {
-
+
JobLaunchRequestHandler messageHandler;
StubJobLauncher jobLauncher;
@@ -29,28 +29,28 @@ public class JobLaunchingMessageHandlerTests extends AbstractJUnit4SpringContext
jobLauncher = new StubJobLauncher();
messageHandler = new JobLaunchingMessageHandler(jobLauncher);
}
-
+
@Test
public void testSimpleDelivery() throws Exception{
messageHandler.launch(new JobLaunchRequest(new JobSupport("testjob"), null));
-
+
assertEquals("Wrong job count", 1, jobLauncher.jobs.size());
assertEquals("Wrong job name", jobLauncher.jobs.get(0).getName(), "testjob");
-
+
}
private static class StubJobLauncher implements JobLauncher {
List jobs = new ArrayList();
-
+
List parameters = new ArrayList();
AtomicLong jobId = new AtomicLong();
-
+
public JobExecution run(Job job, JobParameters jobParameters){
jobs.add(job);
parameters.add(jobParameters);
- return new JobExecution(new JobInstance(jobId.getAndIncrement(), jobParameters, job.getName()));
+ return new JobExecution(new JobInstance(jobId.getAndIncrement(), job.getName()), jobParameters);
}
}
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java
index f9be6fd76..7a5c34e66 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java
@@ -5,11 +5,11 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.springframework.batch.retry.interceptor.MethodInvocationRecoverer;
+import org.springframework.retry.interceptor.MethodInvocationRecoverer;
/**
* @author Dave Syer
- *
+ *
*/
public final class SimpleRecoverer implements MethodInvocationRecoverer {
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java
index ffc005039..dae719a92 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java
@@ -86,11 +86,16 @@ public class TransactionalPollingIntegrationTests implements ApplicationContextA
@Test
@DirtiesContext
public void testSunnyDay() throws Exception {
- list = TransactionAwareProxyFactory.createTransactionalList(Arrays.asList(StringUtils
- .commaDelimitedListToStringArray("a,b,c,d,e,f,g,h,j,k")));
- expected = Arrays.asList(StringUtils.commaDelimitedListToStringArray("a,b,c,d"));
- waitForResults(bus, 4, 60);
- assertEquals(expected, processed);
+ try {
+ list = TransactionAwareProxyFactory.createTransactionalList(Arrays.asList(StringUtils
+ .commaDelimitedListToStringArray("a,b,c,d,e,f,g,h,j,k")));
+ expected = Arrays.asList(StringUtils.commaDelimitedListToStringArray("a,b,c,d"));
+ waitForResults(bus, 4, 60);
+ assertEquals(expected, processed);
+ } catch (Throwable t) {
+ System.out.println(t.getMessage());
+ t.printStackTrace();
+ }
}
@Test
diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml
index 14ae2fcc3..83d6363c0 100644
--- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml
+++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml
@@ -3,13 +3,13 @@
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:integration="http://www.springframework.org/schema/integration"
xmlns:batch="http://www.springframework.org/schema/batch" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd
+ xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
- http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+ http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
@@ -84,11 +84,11 @@
-
+
-
+
-
+
-
+
-
+
-
+