The <poller/> element now accepts the "interval" attribute for an IntervalTrigger instead of "period".
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user