diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java
index db8e4859ff..a506990732 100644
--- a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java
+++ b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java
@@ -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);
diff --git a/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-4.0.xsd b/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-4.0.xsd
index 322d558c6a..b959db6df0 100644
--- a/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-4.0.xsd
+++ b/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-4.0.xsd
@@ -240,6 +240,14 @@
]]>
+
+
+
+
+
+ http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-4.0.xsd">
+ concurrency="1-2" prefetch="50" receive-timeout="100" recovery-interval="1000" phase="99">
diff --git a/src/reference/docbook/jms.xml b/src/reference/docbook/jms.xml
index 23b24fc249..e71c8df950 100644
--- a/src/reference/docbook/jms.xml
+++ b/src/reference/docbook/jms.xml
@@ -1086,6 +1086,16 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
'default').
+
+ container-class
+
+ A custom listener container implementation class
+ as fully qualified class name. Default is Spring's standard
+ DefaultMessageListenerContainer or
+ SimpleMessageListenerContainer,
+ according to the "container-type" attribute.
+
+
connection-factory
@@ -1121,6 +1131,15 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
SimpleMessageConverter.
+
+ error-handler
+
+ A reference to an
+ ErrorHandler strategy for handling
+ any uncaught Exceptions that may occur during the execution of the
+ MessageListener.
+
+
destination-type
@@ -1195,6 +1214,32 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
session. Note that raising this number might lead to starvation of
concurrent consumers!
+
+
+ receive-timeout
+
+ The timeout to use for receive calls (in milliseconds).
+ The default is 1000 ms (1 sec); -1
+ indicates no timeout at all.
+
+
+
+ recovery-interval
+
+ Specify the interval between recovery attempts, in
+ milliseconds. The default is 5000 ms, that is,
+ 5 seconds.
+
+
+
+ phase
+
+ The lifecycle phase within which this container should
+ start and stop. The lower the value the earlier this container will
+ start and the later it will stop. The default is
+ Integer.MAX_VALUE meaning the container will start
+ as late as possible and stop as soon as possible.
+