qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1556654 - /qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/MessageProducerImpl.java
Date Wed, 08 Jan 2014 22:05:25 GMT
Author: rgodfrey
Date: Wed Jan  8 22:05:25 2014
New Revision: 1556654

URL: http://svn.apache.org/r1556654
Log:
QPID-5455 : Publishing non-transactional persistent messages should always be synchronous

Modified:
    qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/MessageProducerImpl.java

Modified: qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/MessageProducerImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/MessageProducerImpl.java?rev=1556654&r1=1556653&r2=1556654&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/MessageProducerImpl.java
(original)
+++ qpid/trunk/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/MessageProducerImpl.java
Wed Jan  8 22:05:25 2014
@@ -301,8 +301,8 @@ public class MessageProducerImpl impleme
         final org.apache.qpid.amqp_1_0.client.Message clientMessage = new org.apache.qpid.amqp_1_0.client.Message(msg.getSections());
 
         DispositionAction action = null;
-
-        if(_syncPublish)
+        final boolean doSync = _syncPublish || (deliveryMode == DeliveryMode.PERSISTENT &&
_session.getTxn() == null);
+        if(doSync)
         {
             action = new DispositionAction(_sender);
         }
@@ -324,7 +324,7 @@ public class MessageProducerImpl impleme
             throw jmsException;
         }
 
-        if(_syncPublish && !action.wasAccepted(_syncPublishTimeout))
+        if(doSync && !action.wasAccepted(_syncPublishTimeout))
         {
             if (action.getOutcome() instanceof Rejected)
             {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message