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.
60
60
* <p>The listener container offers the following message acknowledgment options:
61
61
* <ul>
62
62
* <li>"sessionAcknowledgeMode" set to "AUTO_ACKNOWLEDGE" (default):
63
- * Automatic message acknowledgment <i>before</i> listener execution;
64
- * no redelivery in case of exception thrown.
63
+ * This mode is container-dependent: For {@link DefaultMessageListenerContainer},
64
+ * it means automatic message acknowledgment <i>before</i> listener execution, with
65
+ * no redelivery in case of an exception. For {@link SimpleMessageListenerContainer},
66
+ * it means automatic message acknowledgment <i>after</i> listener execution, with
67
+ * redelivery in case of an exception thrown, as defined by the JMS specification.
68
+ * In order to consistently achieve the latter behavior with any container variant,
69
+ * consider setting "sessionTransacted" to "true" instead.
65
70
* <li>"sessionAcknowledgeMode" set to "CLIENT_ACKNOWLEDGE":
66
71
* Automatic message acknowledgment <i>after</i> successful listener execution;
67
72
* no redelivery in case of exception thrown.
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.
107
107
* <p><b>It is strongly recommended to either set {@link #setSessionTransacted
108
108
* "sessionTransacted"} to "true" or specify an external {@link #setTransactionManager
109
109
* "transactionManager"}.</b> See the {@link AbstractMessageListenerContainer}
110
- * javadoc for details on acknowledge modes and native transaction options,
111
- * as well as the {@link AbstractPollingMessageListenerContainer} javadoc
112
- * for details on configuring an external transaction manager.
110
+ * javadoc for details on acknowledge modes and native transaction options, as
111
+ * well as the {@link AbstractPollingMessageListenerContainer} javadoc for details
112
+ * on configuring an external transaction manager. Note that for the default
113
+ * "AUTO_ACKNOWLEDGE" mode, this container applies automatic message acknowledgment
114
+ * before listener execution, with no redelivery in case of an exception.
113
115
*
114
116
* @author Juergen Hoeller
115
117
* @since 2.0
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.
44
44
* on the JMS provider: Not even the ServerSessionPool facility is required.
45
45
*
46
46
* <p>See the {@link AbstractMessageListenerContainer} javadoc for details
47
- * on acknowledge modes and transaction options.
47
+ * on acknowledge modes and transaction options. Note that this container
48
+ * exposes standard JMS behavior for the default "AUTO_ACKNOWLEDGE" mode:
49
+ * that is, automatic message acknowledgment after listener execution,
50
+ * with redelivery in case of an exception thrown.
48
51
*
49
52
* <p>For a different style of MessageListener handling, through looped
50
53
* {@code MessageConsumer.receive()} calls that also allow for
You can’t perform that action at this time.
0 commit comments