diff --git a/spring-batch-admin-parent/pom.xml b/spring-batch-admin-parent/pom.xml
index f763d168c..97967d24d 100755
--- a/spring-batch-admin-parent/pom.xml
+++ b/spring-batch-admin-parent/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.batchspring-batch-admin-parent
- 1.3.0.BUILD-SNAPSHOT
+ 2.0.0.BUILD-SNAPSHOTSpring Batch Admin ParentA set of services (Java, JSON) and a UI (webapp) for managing and launching Spring Batch jobs.http://www.springsource.org/spring-batch-admin
@@ -34,10 +34,10 @@
false
- 2.2.3.BUILD-SNAPSHOT
- 3.2.1.RELEASE
- 2.2.5.RELEASE
- 1.0.2.RELEASE
+ 2.2.4.BUILD-SNAPSHOT
+ 4.0.0.BUILD-SNAPSHOT
+ 4.0.0.BUILD-SNAPSHOT
+ 1.0.3.RELEASE
@@ -346,7 +346,7 @@
org.codehaus.jacksonjackson-mapper-asl
- 1.6.3
+ 1.9.2test
diff --git a/spring-batch-integration/pom.xml b/spring-batch-integration/pom.xml
index 2e7ed1bfa..08e25a0ca 100644
--- a/spring-batch-integration/pom.xml
+++ b/spring-batch-integration/pom.xml
@@ -7,7 +7,7 @@
org.springframework.batchspring-batch-admin-parent
- 1.3.0.BUILD-SNAPSHOT
+ 2.0.0.BUILD-SNAPSHOT../spring-batch-admin-parent
diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/StepExecutionInterceptor.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/StepExecutionInterceptor.java
index 7fd5a9083..056eade96 100644
--- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/StepExecutionInterceptor.java
+++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/StepExecutionInterceptor.java
@@ -18,11 +18,11 @@ package org.springframework.batch.integration.async;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.scope.context.StepContext;
import org.springframework.batch.core.scope.context.StepSynchronizationManager;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageChannel;
import org.springframework.integration.channel.ChannelInterceptor;
import org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter;
import org.springframework.integration.support.MessageBuilder;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
/**
* A {@link ChannelInterceptor} that adds the current {@link StepExecution} (if
@@ -30,9 +30,9 @@ import org.springframework.integration.support.MessageBuilder;
* can then take advantage of the step context without needing to be step
* scoped, which is a problem for handlers executing in another thread because
* the scope context is not available.
- *
+ *
* @author Dave Syer
- *
+ *
*/
public class StepExecutionInterceptor extends ChannelInterceptorAdapter {
diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java
index 588a0fe63..0a6782790 100644
--- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java
+++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java
@@ -34,10 +34,10 @@ import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemWriter;
-import org.springframework.integration.Message;
-import org.springframework.integration.core.MessagingOperations;
-import org.springframework.integration.core.PollableChannel;
-import org.springframework.integration.message.GenericMessage;
+import org.springframework.integration.core.MessagingTemplate;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.PollableChannel;
+import org.springframework.messaging.support.GenericMessage;
import org.springframework.util.Assert;
public class ChunkMessageChannelItemWriter extends StepExecutionListenerSupport implements ItemWriter,
@@ -51,13 +51,13 @@ public class ChunkMessageChannelItemWriter extends StepExecutionListenerSuppo
private static final long DEFAULT_THROTTLE_LIMIT = 6;
- private MessagingOperations messagingGateway;
+ private MessagingTemplate messagingGateway;
- private LocalState localState = new LocalState();
+ private final LocalState localState = new LocalState();
private long throttleLimit = DEFAULT_THROTTLE_LIMIT;
- private int DEFAULT_MAX_WAIT_TIMEOUTS = 40;
+ private final int DEFAULT_MAX_WAIT_TIMEOUTS = 40;
private int maxWaitTimeouts = DEFAULT_MAX_WAIT_TIMEOUTS;
@@ -67,7 +67,7 @@ public class ChunkMessageChannelItemWriter extends StepExecutionListenerSuppo
* The maximum number of times to wait at the end of a step for a non-null result from the remote workers. This is a
* multiplier on the receive timeout set separately on the gateway. The ideal value is a compromise between allowing
* slow workers time to finish, and responsiveness if there is a dead worker. Defaults to 40.
- *
+ *
* @param maxWaitTimeouts the maximum number of wait timeouts
*/
public void setMaxWaitTimeouts(int maxWaitTimeouts) {
@@ -83,7 +83,7 @@ public class ChunkMessageChannelItemWriter extends StepExecutionListenerSuppo
this.throttleLimit = throttleLimit;
}
- public void setMessagingOperations(MessagingOperations messagingGateway) {
+ public void setMessagingOperations(MessagingTemplate messagingGateway) {
this.messagingGateway = messagingGateway;
}
@@ -184,7 +184,7 @@ public class ChunkMessageChannelItemWriter extends StepExecutionListenerSuppo
/**
* Wait until all the results that are in the pipeline come back to the reply channel.
- *
+ *
* @return true if successfully received a result, false if timed out
*/
private boolean waitForResults() throws AsynchronousFailureException {
@@ -210,9 +210,9 @@ public class ChunkMessageChannelItemWriter extends StepExecutionListenerSuppo
/**
* Get the next result if it is available (within the timeout specified in the gateway), otherwise do nothing.
- *
+ *
* @throws AsynchronousFailureException If there is a response and it contains a failed chunk response.
- *
+ *
* @throws IllegalStateException if the result contains the wrong job instance id (maybe we are sharing a channel
* and we shouldn't be)
*/
@@ -263,17 +263,17 @@ public class ChunkMessageChannelItemWriter extends StepExecutionListenerSuppo
private static class LocalState {
- private AtomicInteger current = new AtomicInteger(-1);
+ private final AtomicInteger current = new AtomicInteger(-1);
- private AtomicInteger actual = new AtomicInteger();
+ private final AtomicInteger actual = new AtomicInteger();
- private AtomicInteger expected = new AtomicInteger();
+ private final AtomicInteger expected = new AtomicInteger();
- private AtomicInteger redelivered = new AtomicInteger();
+ private final AtomicInteger redelivered = new AtomicInteger();
private StepExecution stepExecution;
- private Queue contributions = new LinkedBlockingQueue();
+ private final Queue contributions = new LinkedBlockingQueue();
public int getExpecting() {
return expected.get() - actual.get();
diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java
index c7372f097..e66b7d8ec 100644
--- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java
+++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java
@@ -3,11 +3,11 @@ package org.springframework.batch.integration.chunk;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageChannel;
import org.springframework.integration.channel.ChannelInterceptor;
import org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter;
import org.springframework.integration.core.MessageSource;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
import org.springframework.util.Assert;
@@ -16,9 +16,9 @@ import org.springframework.util.Assert;
* receive() on the channel it will delegate to a {@link MessageSource} to pull the message directly from
* an external source. This is particularly useful in combination with a message channel in thread scope, in which case
* the receive() can join a transaction which was started by the caller.
- *
+ *
* @author Dave Syer
- *
+ *
*/
public class MessageSourcePollerInterceptor extends ChannelInterceptorAdapter implements InitializingBean {
@@ -44,7 +44,7 @@ public class MessageSourcePollerInterceptor extends ChannelInterceptorAdapter im
/**
* Optional MessageChannel for injecting the message received from the source (defaults to the channel intercepted
* in {@link #preReceive(MessageChannel)}).
- *
+ *
* @param channel the channel to set
*/
public void setChannel(MessageChannel channel) {
@@ -69,7 +69,7 @@ public class MessageSourcePollerInterceptor extends ChannelInterceptorAdapter im
/**
* Receive from the {@link MessageSource} and send immediately to the input channel, so that the call that we are
* intercepting always a message to receive.
- *
+ *
* @see ChannelInterceptorAdapter#preReceive(MessageChannel)
*/
@Override
diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java
index 201a03d2e..16b56f623 100644
--- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java
+++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java
@@ -19,9 +19,9 @@ package org.springframework.batch.integration.launch;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionException;
import org.springframework.batch.core.launch.JobLauncher;
-import org.springframework.integration.Message;
import org.springframework.integration.MessageHandlingException;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
+import org.springframework.messaging.Message;
import org.springframework.util.Assert;
/**
diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java
index b0fa801d8..b0599c1d7 100644
--- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java
+++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java
@@ -11,15 +11,15 @@ import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.partition.PartitionHandler;
import org.springframework.batch.core.partition.StepExecutionSplitter;
import org.springframework.batch.core.repository.JobRepository;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageChannel;
import org.springframework.integration.annotation.Aggregator;
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.annotation.Payloads;
import org.springframework.integration.channel.QueueChannel;
-import org.springframework.integration.core.MessagingOperations;
-import org.springframework.integration.core.PollableChannel;
+import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.support.MessageBuilder;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.PollableChannel;
import org.springframework.util.Assert;
/**
@@ -30,10 +30,10 @@ import org.springframework.util.Assert;
* well as a remote web service or JMS implementation. If a remote worker fails or doesn't send a reply message, the job
* will fail and can be restarted to pick up missing messages and processing. The remote workers need access to the
* Spring Batch {@link JobRepository} so that the shared state across those restarts can be managed centrally.
- *
+ *
* @author Dave Syer
* @author Will Schipp
- *
+ *
*/
@MessageEndpoint
public class MessageChannelPartitionHandler implements PartitionHandler {
@@ -42,10 +42,10 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
private int gridSize = 1;
- private MessagingOperations messagingGateway;
+ private MessagingTemplate messagingGateway;
private String stepName;
-
+
/**
* pollable channel for the replies
*/
@@ -62,10 +62,10 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
* internally:
request channel capable of accepting {@link StepExecutionRequest} payloads
reply
* channel that returns a list of {@link StepExecution} results
The timeout for the repoy should be set
* sufficiently long that the remote steps have time to complete.
- *
+ *
* @param messagingGateway the {@link MessagingOperations} to set
*/
- public void setMessagingOperations(MessagingOperations messagingGateway) {
+ public void setMessagingOperations(MessagingTemplate messagingGateway) {
this.messagingGateway = messagingGateway;
}
@@ -73,7 +73,7 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
* Passed to the {@link StepExecutionSplitter} in the {@link #handle(StepExecutionSplitter, StepExecution)} method,
* instructing it how many {@link StepExecution} instances are required, ideally. The {@link StepExecutionSplitter}
* is allowed to ignore the grid size in the case of a restart, since the input data partitions must be preserved.
- *
+ *
* @param gridSize the number of step executions that will be created
*/
public void setGridSize(int gridSize) {
@@ -85,7 +85,7 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
* regular Spring Batch step, with all the business logic required to complete an execution based on the input
* parameters in its {@link StepExecution} context. The name will be translated into a {@link Step} instance by the
* remote worker.
- *
+ *
* @param stepName the name of the {@link Step} instance to execute business logic
*/
public void setStepName(String stepName) {
@@ -110,7 +110,7 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
* receives the result back as a list of {@link StepExecution} on a reply channel. Use the {@link #aggregate(List)}
* method as an aggregator of the individual remote replies. The receive timeout needs to be set realistically in
* the {@link MessagingOperations} and the aggregator, so that there is a good chance of all work being done.
- *
+ *
* @see PartitionHandler#handle(StepExecutionSplitter, StepExecution)
*/
public Collection handle(StepExecutionSplitter stepExecutionSplitter,
@@ -118,11 +118,11 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
Set split = stepExecutionSplitter.split(masterStepExecution, gridSize);
int count = 0;
-
+
if (replyChannel == null) {
replyChannel = new QueueChannel();
- }//end if
-
+ }//end if
+
for (StepExecution stepExecution : split) {
Message request = createMessage(count++, split.size(), new StepExecutionRequest(
stepName, stepExecution.getJobExecutionId(), stepExecution.getId()), replyChannel);
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/SmokeTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/SmokeTests.java
index 288d57cfa..bb5d10281 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/SmokeTests.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/SmokeTests.java
@@ -6,12 +6,12 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageChannel;
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.annotation.ServiceActivator;
-import org.springframework.integration.core.PollableChannel;
-import org.springframework.integration.message.GenericMessage;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.PollableChannel;
+import org.springframework.messaging.support.GenericMessage;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -25,7 +25,7 @@ public class SmokeTests {
@Autowired
private PollableChannel smokeout;
-
+
// This has to be static because Spring Integration registers the handler
// more than once (every time a test instance is created), but only one of
// them will get the message.
@@ -48,7 +48,7 @@ public class SmokeTests {
smokein.send(new GenericMessage("foo"));
@SuppressWarnings("unchecked")
Message message = (Message) smokeout.receive(100);
- String result = (String) (message == null ? null : message.getPayload());
+ String result = message == null ? null : message.getPayload();
assertEquals("foo: 1", result);
assertEquals(1, count);
}
diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/ChunkMessageItemWriterIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/ChunkMessageItemWriterIntegrationTests.java
index f4e795c7b..fe9d1ab9c 100644
--- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/ChunkMessageItemWriterIntegrationTests.java
+++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/ChunkMessageItemWriterIntegrationTests.java
@@ -33,11 +33,11 @@ import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageChannel;
import org.springframework.integration.core.MessagingTemplate;
-import org.springframework.integration.core.PollableChannel;
-import org.springframework.integration.message.GenericMessage;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.PollableChannel;
+import org.springframework.messaging.support.GenericMessage;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.StringUtils;
@@ -46,7 +46,7 @@ import org.springframework.util.StringUtils;
@RunWith(SpringJUnit4ClassRunner.class)
public class ChunkMessageItemWriterIntegrationTests {
- private ChunkMessageChannelItemWriter