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 11/* 
2-  * Copyright 2002-2014  the original author or authors. 
2+  * Copyright 2002-2015  the original author or authors. 
33 * 
44 * Licensed under the Apache License, Version 2.0 (the "License"); 
55 * you may not use this file except in compliance with the License. 
6060 * <p>The listener container offers the following message acknowledgment options: 
6161 * <ul> 
6262 * <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. 
6570 * <li>"sessionAcknowledgeMode" set to "CLIENT_ACKNOWLEDGE": 
6671 * Automatic message acknowledgment <i>after</i> successful listener execution; 
6772 * no redelivery in case of exception thrown. 
Original file line number Diff line number Diff line change 11/* 
2-  * Copyright 2002-2014  the original author or authors. 
2+  * Copyright 2002-2015  the original author or authors. 
33 * 
44 * Licensed under the Apache License, Version 2.0 (the "License"); 
55 * you may not use this file except in compliance with the License. 
107107 * <p><b>It is strongly recommended to either set {@link #setSessionTransacted 
108108 * "sessionTransacted"} to "true" or specify an external {@link #setTransactionManager 
109109 * "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. 
113115 * 
114116 * @author Juergen Hoeller 
115117 * @since 2.0 
Original file line number Diff line number Diff line change 11/* 
2-  * Copyright 2002-2014  the original author or authors. 
2+  * Copyright 2002-2015  the original author or authors. 
33 * 
44 * Licensed under the Apache License, Version 2.0 (the "License"); 
55 * you may not use this file except in compliance with the License. 
4444 * on the JMS provider: Not even the ServerSessionPool facility is required. 
4545 * 
4646 * <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. 
4851 * 
4952 * <p>For a different style of MessageListener handling, through looped 
5053 * {@code MessageConsumer.receive()} calls that also allow for 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments