INT-1715 fixed poller schema definition to allow 'ref' attribute on inner-pollers definitions used in non-core schemas

This commit is contained in:
Oleg Zhurakousky
2011-01-04 13:12:49 -05:00
parent 454f349163
commit d9263ea92a
7 changed files with 49 additions and 22 deletions

View File

@@ -35,6 +35,7 @@ import org.springframework.scheduling.support.PeriodicTrigger;
/**
* @author Mark Fisher
* @author Oleg Zhurakousky
*/
public class PollerParserTests {
@@ -111,4 +112,10 @@ public class PollerParserTests {
new ClassPathXmlApplicationContext(
"cronTriggerWithTimeUnit-fail.xml", PollerParserTests.class);
}
@Test(expected=BeanDefinitionParsingException.class)
public void topLevelPollerWithRef() {
new ClassPathXmlApplicationContext(
"defaultPollerWithRef.xml", PollerParserTests.class);
}
}

View File

@@ -0,0 +1,14 @@
<?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-2.0.xsd">
<poller id="defaultPollerWithId" default="true" fixed-rate="5000"/>
<poller id="defaultPollerWithRef" ref="defaultPollerWithId"/>
</beans:beans>