INT-810 Removed "thread-pool-task-executor" element now that Spring 3.0's "task" namespace provides an "executor" element.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
|
||||
<channel id="input">
|
||||
<queue capacity="5" />
|
||||
@@ -17,8 +18,7 @@
|
||||
</poller>
|
||||
</aggregator>
|
||||
|
||||
<thread-pool-task-executor id="executor"
|
||||
core-size="5" />
|
||||
<task:executor id="executor" pool-size="5"/>
|
||||
|
||||
<channel id="output">
|
||||
<queue capacity="5" />
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
|
||||
<annotation-config />
|
||||
|
||||
@@ -18,12 +19,10 @@
|
||||
</poller>
|
||||
</aggregator>
|
||||
|
||||
<thread-pool-task-executor id="executor"
|
||||
core-size="5" />
|
||||
<task:executor id="executor" pool-size="5"/>
|
||||
|
||||
<channel id="output">
|
||||
<queue capacity="5" />
|
||||
</channel>
|
||||
|
||||
|
||||
</beans:beans>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.aggregator.integration;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
@@ -26,6 +27,7 @@ import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.integration.aggregator.AbstractMessageAggregator;
|
||||
@@ -40,7 +42,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
/**
|
||||
* @author Alex Peters
|
||||
* @author Iwein Fuld
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
@@ -48,14 +49,15 @@ public class DefaultMessageAggregatorIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("input")
|
||||
MessageChannel input;
|
||||
private MessageChannel input;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("output")
|
||||
PollableChannel output;
|
||||
private PollableChannel output;
|
||||
|
||||
@Autowired
|
||||
AbstractMessageAggregator aggregator;
|
||||
private AbstractMessageAggregator aggregator;
|
||||
|
||||
|
||||
@Test
|
||||
public void configOk() throws Exception {
|
||||
@@ -71,15 +73,17 @@ public class DefaultMessageAggregatorIntegrationTests {
|
||||
}
|
||||
Object payload = output.receive().getPayload();
|
||||
assertThat(payload, is(List.class));
|
||||
assertTrue(payload + " doesn't contain all of {0,1,2,3,4}", ((List) payload).containsAll(Arrays.asList(0, 1, 2,
|
||||
3, 4)));
|
||||
assertTrue(payload + " doesn't contain all of {0,1,2,3,4}",
|
||||
((List) payload).containsAll(Arrays.asList(0, 1, 2, 3, 4)));
|
||||
}
|
||||
|
||||
Map<String, Object> stubHeaders(int sequenceNumber, int sequenceSize, int correllationId) {
|
||||
|
||||
private Map<String, Object> stubHeaders(int sequenceNumber, int sequenceSize, int correllationId) {
|
||||
Map<String, Object> headers = new HashMap<String, Object>();
|
||||
headers.put(MessageHeaders.SEQUENCE_NUMBER, sequenceNumber);
|
||||
headers.put(MessageHeaders.SEQUENCE_SIZE, sequenceSize);
|
||||
headers.put(MessageHeaders.CORRELATION_ID, correllationId);
|
||||
return headers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
|
||||
<publish-subscribe-channel id="defaultChannel"/>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<publish-subscribe-channel id="channelWithErrorHandler" error-handler="testErrorHandler"/>
|
||||
|
||||
<thread-pool-task-executor id="pool" max-size="1"/>
|
||||
<task:executor id="pool" pool-size="1"/>
|
||||
|
||||
<beans:bean id="testErrorHandler" class="org.springframework.integration.config.TestErrorHandler"/>
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
|
||||
<channel id="channel"/>
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
</poller>
|
||||
</outbound-channel-adapter>
|
||||
|
||||
<thread-pool-task-executor id="executor" core-size="5" />
|
||||
<task:executor id="executor" pool-size="5" />
|
||||
|
||||
</beans:beans>
|
||||
|
||||
@@ -17,9 +17,13 @@ splitter-inner-success=\
|
||||
splitter-inner-success-with-poller=\
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:task="http://www.springframework.org/schema/task" \
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans \
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd \
|
||||
http://www.springframework.org/schema/task \
|
||||
http://www.springframework.org/schema/task/spring-task.xsd \
|
||||
http://www.springframework.org/schema/integration \
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd"> \
|
||||
<channel id="inChannel"> \
|
||||
@@ -34,14 +38,18 @@ splitter-inner-success-with-poller=\
|
||||
<interval-trigger interval="20" /> \
|
||||
</poller> \
|
||||
</splitter> \
|
||||
<thread-pool-task-executor id="executor" core-size="5" /> \
|
||||
<task:executor id="executor" pool-size="5" /> \
|
||||
</beans:beans>
|
||||
splitter-inner-success-with-poller-reversed-order=\
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:task="http://www.springframework.org/schema/task" \
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans \
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd \
|
||||
http://www.springframework.org/schema/task \
|
||||
http://www.springframework.org/schema/task/spring-task.xsd \
|
||||
http://www.springframework.org/schema/integration \
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd"> \
|
||||
<channel id="inChannel"> \
|
||||
@@ -56,7 +64,7 @@ splitter-inner-success-with-poller-reversed-order=\
|
||||
</poller> \
|
||||
<beans:bean class="org.springframework.integration.config.xml.InnerDefinitionHandlerAwareEndpointParserTests$TestSplitter" /> \
|
||||
</splitter> \
|
||||
<thread-pool-task-executor id="executor" core-size="5" /> \
|
||||
<task:executor id="executor" pool-size="5" /> \
|
||||
</beans:beans>
|
||||
splitter-ref-success=\
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
@@ -272,9 +280,13 @@ aggregator-ref-success=\
|
||||
aggregator-inner-concurrent-success=\
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:task="http://www.springframework.org/schema/task" \
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans \
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd \
|
||||
http://www.springframework.org/schema/task \
|
||||
http://www.springframework.org/schema/task/spring-task.xsd \
|
||||
http://www.springframework.org/schema/integration \
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd"> \
|
||||
<channel id="inChannel"> \
|
||||
@@ -289,14 +301,18 @@ aggregator-inner-concurrent-success=\
|
||||
</poller> \
|
||||
<beans:bean class="org.springframework.integration.config.xml.InnerDefinitionHandlerAwareEndpointParserTests$TestAggregator"/> \
|
||||
</aggregator> \
|
||||
<thread-pool-task-executor id="executor" core-size="5" /> \
|
||||
<task:executor id="executor" pool-size="5" /> \
|
||||
</beans:beans>
|
||||
aggregator-inner-concurrent-success-reorder-bean-poller=\
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" \
|
||||
xmlns:task="http://www.springframework.org/schema/task" \
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans \
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd \
|
||||
http://www.springframework.org/schema/task \
|
||||
http://www.springframework.org/schema/task/spring-task.xsd \
|
||||
http://www.springframework.org/schema/integration \
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd"> \
|
||||
<channel id="inChannel"> \
|
||||
@@ -311,7 +327,7 @@ aggregator-inner-concurrent-success-reorder-bean-poller=\
|
||||
<interval-trigger interval="20" /> \
|
||||
</poller> \
|
||||
</aggregator> \
|
||||
<thread-pool-task-executor id="executor" core-size="5" /> \
|
||||
<task:executor id="executor" pool-size="5" /> \
|
||||
</beans:beans>
|
||||
aggregator-failure-refAndBean=\
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:si="http://www.springframework.org/schema/integration"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
xmlns:si="http://www.springframework.org/schema/integration"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">
|
||||
|
||||
<si:channel id="errorChannel">
|
||||
<si:queue capacity="10"/>
|
||||
@@ -15,6 +15,6 @@
|
||||
<property name="taskExecutor" ref="taskExecutor"/>
|
||||
</bean>
|
||||
|
||||
<si:thread-pool-task-executor id="taskExecutor" core-size="1" max-size="1" rejection-policy="CALLER_RUNS"/>
|
||||
<task:executor id="taskExecutor" pool-size="1" rejection-policy="CALLER_RUNS"/>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user