Author: rgodfrey
Date: Wed Apr 23 07:27:19 2008
New Revision: 650887

URL: http://svn.apache.org/viewvc?rev=650887&view=rev
Log:
QPID-832 : Fixed AMQSession_0_10 so that it takes the acknowledge mode from the 
session not a system definition

Modified:
    
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java

Modified: 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=650887&r1=650886&r2=650887&view=diff
==============================================================================
--- 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
 (original)
+++ 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
 Wed Apr 23 07:27:19 2008
@@ -395,16 +395,16 @@
         try
         {
             preAcquire = ( ! consumer.isNoConsume()  && 
consumer.getMessageSelector() == null) || !(consumer.getDestination() 
instanceof AMQQueue);
+            getQpidSession().messageSubscribe(queueName.toString(), 
tag.toString(),
+                                              getAcknowledgeMode() == 
NO_ACKNOWLEDGE ? 
Session.TRANSFER_CONFIRM_MODE_NOT_REQUIRED:Session.TRANSFER_CONFIRM_MODE_REQUIRED,
+                                              preAcquire ? 
Session.TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE : 
Session.TRANSFER_ACQUIRE_MODE_NO_ACQUIRE,
+                                              new 
MessagePartListenerAdapter((BasicMessageConsumer_0_10) consumer), null,
+                                              consumer.isExclusive() ? 
Option.EXCLUSIVE : Option.NO_OPTION);
         }
         catch (JMSException e)
         {
             throw new AMQException(AMQConstant.INTERNAL_ERROR, "problem when 
registering consumer", e);
         }
-        getQpidSession().messageSubscribe(queueName.toString(), tag.toString(),
-                                          (Boolean.getBoolean("noAck") 
?Session.TRANSFER_CONFIRM_MODE_NOT_REQUIRED:Session.TRANSFER_CONFIRM_MODE_REQUIRED),
-                                          preAcquire ? 
Session.TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE : 
Session.TRANSFER_ACQUIRE_MODE_NO_ACQUIRE,
-                                          new 
MessagePartListenerAdapter((BasicMessageConsumer_0_10) consumer), null,
-                                          consumer.isExclusive() ? 
Option.EXCLUSIVE : Option.NO_OPTION);
 
         if (! prefetch())
         {


Reply via email to