Added "recovery-interval" attribute to <jms:listener-container>
Issue: SPR-10711
This commit is contained in:
@@ -49,6 +49,8 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser {
|
||||
|
||||
private static final String RECEIVE_TIMEOUT_ATTRIBUTE = "receive-timeout";
|
||||
|
||||
private static final String RECOVERY_INTERVAL_ATTRIBUTE = "recovery-interval";
|
||||
|
||||
|
||||
@Override
|
||||
protected BeanDefinition parseContainer(Element listenerEle, Element containerEle, ParserContext parserContext) {
|
||||
@@ -160,6 +162,13 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser {
|
||||
}
|
||||
}
|
||||
|
||||
String recoveryInterval = containerEle.getAttribute(RECOVERY_INTERVAL_ATTRIBUTE);
|
||||
if (StringUtils.hasText(recoveryInterval)) {
|
||||
if (containerType.startsWith("default")) {
|
||||
containerDef.getPropertyValues().add("recoveryInterval", recoveryInterval);
|
||||
}
|
||||
}
|
||||
|
||||
String phase = containerEle.getAttribute(PHASE_ATTRIBUTE);
|
||||
if (StringUtils.hasText(phase)) {
|
||||
containerDef.getPropertyValues().add("phase", phase);
|
||||
|
||||
@@ -240,6 +240,14 @@
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="recovery-interval" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Specify the interval between recovery attempts, in milliseconds.
|
||||
The default is 5000 ms, that is, 5 seconds.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="phase" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user