File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
spring-jms/src/main/java/org/springframework/jms/listener Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2014 the original author or authors.
2
+ * Copyright 2002-2015 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
54
54
* <p>The listener container offers the following message acknowledgment options:
55
55
* <ul>
56
56
* <li>"sessionAcknowledgeMode" set to "AUTO_ACKNOWLEDGE" (default):
57
- * Automatic message acknowledgment <i>before</i> listener execution;
58
- * no redelivery in case of exception thrown.
57
+ * This mode is container-dependent: For {@link DefaultMessageListenerContainer},
58
+ * it means automatic message acknowledgment <i>before</i> listener execution, with
59
+ * no redelivery in case of an exception. For {@link SimpleMessageListenerContainer},
60
+ * it means automatic message acknowledgment <i>after</i> listener execution, with
61
+ * redelivery in case of an exception thrown, as defined by the JMS specification.
62
+ * In order to consistently achieve the latter behavior with any container variant,
63
+ * consider setting "sessionTransacted" to "true" instead.
59
64
* <li>"sessionAcknowledgeMode" set to "CLIENT_ACKNOWLEDGE":
60
65
* Automatic message acknowledgment <i>after</i> successful listener execution;
61
66
* no redelivery in case of exception thrown.
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2015 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
104
104
* <p><b>It is strongly recommended to either set {@link #setSessionTransacted
105
105
* "sessionTransacted"} to "true" or specify an external {@link #setTransactionManager
106
106
* "transactionManager"}.</b> See the {@link AbstractMessageListenerContainer}
107
- * javadoc for details on acknowledge modes and native transaction options,
108
- * as well as the {@link AbstractPollingMessageListenerContainer} javadoc
109
- * for details on configuring an external transaction manager.
107
+ * javadoc for details on acknowledge modes and native transaction options, as
108
+ * well as the {@link AbstractPollingMessageListenerContainer} javadoc for details
109
+ * on configuring an external transaction manager. Note that for the default
110
+ * "AUTO_ACKNOWLEDGE" mode, this container applies automatic message acknowledgment
111
+ * before listener execution, with no redelivery in case of an exception.
110
112
*
111
113
* @author Juergen Hoeller
112
114
* @since 2.0
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2015 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
45
45
* on the JMS provider: Not even the ServerSessionPool facility is required.
46
46
*
47
47
* <p>See the {@link AbstractMessageListenerContainer} javadoc for details
48
- * on acknowledge modes and transaction options.
48
+ * on acknowledge modes and transaction options. Note that this container
49
+ * exposes standard JMS behavior for the default "AUTO_ACKNOWLEDGE" mode:
50
+ * that is, automatic message acknowledgment after listener execution,
51
+ * with redelivery in case of an exception thrown.
49
52
*
50
53
* <p>For a different style of MessageListener handling, through looped
51
54
* {@code MessageConsumer.receive()} calls that also allow for
You can’t perform that action at this time.
0 commit comments