diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java index ea187a787d8..e41829892b6 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,8 +60,13 @@ import org.springframework.util.ReflectionUtils; *
The listener container offers the following message acknowledgment options: *
It is strongly recommended to either set {@link #setSessionTransacted * "sessionTransacted"} to "true" or specify an external {@link #setTransactionManager * "transactionManager"}. See the {@link AbstractMessageListenerContainer} - * javadoc for details on acknowledge modes and native transaction options, - * as well as the {@link AbstractPollingMessageListenerContainer} javadoc - * for details on configuring an external transaction manager. + * javadoc for details on acknowledge modes and native transaction options, as + * well as the {@link AbstractPollingMessageListenerContainer} javadoc for details + * on configuring an external transaction manager. Note that for the default + * "AUTO_ACKNOWLEDGE" mode, this container applies automatic message acknowledgment + * before listener execution, with no redelivery in case of an exception. * * @author Juergen Hoeller * @since 2.0 diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java index 019c553b9ef..b5272f720bd 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,10 @@ import org.springframework.util.Assert; * on the JMS provider: Not even the ServerSessionPool facility is required. * *
See the {@link AbstractMessageListenerContainer} javadoc for details - * on acknowledge modes and transaction options. + * on acknowledge modes and transaction options. Note that this container + * exposes standard JMS behavior for the default "AUTO_ACKNOWLEDGE" mode: + * that is, automatic message acknowledgment after listener execution, + * with redelivery in case of an exception thrown. * *
For a different style of MessageListener handling, through looped * {@code MessageConsumer.receive()} calls that also allow for