The <poller/> element now accepts the "interval" attribute for an IntervalTrigger instead of "period".

This commit is contained in:
Mark Fisher
2008-09-24 19:40:38 +00:00
parent b52a2bb551
commit b0fc5da6a2
14 changed files with 22 additions and 22 deletions

View File

@@ -141,11 +141,11 @@ public abstract class IntegrationNamespaceUtils {
*/
public static void configureTrigger(Element pollerElement, BeanDefinitionBuilder targetBuilder) {
Trigger trigger = null;
String interval = pollerElement.getAttribute("period");
String interval = pollerElement.getAttribute("interval");
String cron = pollerElement.getAttribute("cron");
if (!(StringUtils.hasText(interval) ^ StringUtils.hasText(cron))) {
throw new ConfigurationException(
"A <poller> element must define either a period or a cron expression (but not both).");
"A <poller> element must include either an 'interval' or a 'cron' expression (but not both).");
}
if (StringUtils.hasText(interval)) {
Long period = Long.valueOf(interval);

View File

@@ -245,7 +245,7 @@
<xsd:sequence>
<xsd:element name="transactional" type="transactionalType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="period" type="xsd:long"/>
<xsd:attribute name="interval" type="xsd:long"/>
<xsd:attribute name="cron" type="xsd:string"/>
<xsd:attribute name="initial-delay" type="xsd:long"/>
<xsd:attribute name="fixed-rate" type="xsd:boolean"/>