Cleaned up XSD to remove dependency on the order in which inner beans and pollers are defined. Added test case.

This commit is contained in:
Oleg Zhurakousky
2009-07-09 15:50:39 +00:00
parent 798fc39290
commit 5bcd33ea05
3 changed files with 37 additions and 6 deletions

View File

@@ -1061,9 +1061,11 @@
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="handlerEndpointType">
<xsd:choice>
<xsd:element ref="beans:bean" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:sequence>
<xsd:element ref="beans:bean" minOccurs="0" maxOccurs="1" />
<xsd:any processContents="strict" namespace="http://www.springframework.org/schema/integration"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="completion-strategy" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
@@ -1285,9 +1287,11 @@
<xsd:complexType name="innerEndpointDefinitionAware">
<xsd:complexContent>
<xsd:extension base="handlerEndpointType">
<xsd:choice>
<xsd:element ref="beans:bean" minOccurs="0" maxOccurs="1" />
</xsd:choice>
<xsd:sequence>
<xsd:element ref="beans:bean" minOccurs="0" maxOccurs="1" />
<xsd:any processContents="strict" namespace="http://www.springframework.org/schema/integration"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

View File

@@ -136,6 +136,11 @@ public class InnerDefinitionHandlerAwareEndpointParserTests {
this.testAggregatorDefinitionSuccess(configProperty);
}
@Test
public void testInnerConcurrentAggregatorDefinitionSuccessReorderBeanPoller(){
String configProperty = testConfigurations.getProperty("aggregator-inner-concurrent-success-reorder-bean-poller");
this.testAggregatorDefinitionSuccess(configProperty);
}
@Test
public void testRefAggregatorDefinitionSuccess(){
String configProperty = testConfigurations.getProperty("aggregator-ref-success");
this.testAggregatorDefinitionSuccess(configProperty);

View File

@@ -247,6 +247,28 @@ aggregator-inner-concurrent-success=\
</aggregator> \
<thread-pool-task-executor id="executor" core-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" \
xsi:schemaLocation="http://www.springframework.org/schema/beans \
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd \
http://www.springframework.org/schema/integration \
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd"> \
<channel id="inChannel"> \
<queue capacity="5" /> \
</channel> \
<channel id="outChannel"> \
<queue capacity="5" /> \
</channel> \
<aggregator input-channel="inChannel" method="sum" output-channel="outChannel"> \
<beans:bean class="org.springframework.integration.config.xml.InnerDefinitionHandlerAwareEndpointParserTests$TestAggregator"/> \
<poller task-executor="executor" max-messages-per-poll="5"> \
<interval-trigger interval="20" /> \
</poller> \
</aggregator> \
<thread-pool-task-executor id="executor" core-size="5" /> \
</beans:beans>
aggregator-failure-refAndBean=\
<?xml version="1.0" encoding="UTF-8"?> \
<beans:beans xmlns="http://www.springframework.org/schema/integration" \