activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-701 Set Accepted on AMQP discharge
Date Tue, 06 Sep 2016 13:37:08 GMT
ARTEMIS-701 Set Accepted on AMQP discharge


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/930d814d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/930d814d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/930d814d

Branch: refs/heads/master
Commit: 930d814daff0533292db669b9581eb4d706376d9
Parents: b13d1b0
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Fri Aug 26 10:39:17 2016 +0100
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Sep 6 09:36:50 2016 -0400

----------------------------------------------------------------------
 .../java/org/proton/plug/context/ProtonTransactionHandler.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/930d814d/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java
b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java
index c8fb994..597b5e4 100644
--- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java
+++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java
@@ -20,6 +20,7 @@ import io.netty.buffer.ByteBuf;
 import io.netty.buffer.PooledByteBufAllocator;
 import org.apache.qpid.proton.amqp.Binary;
 import org.apache.qpid.proton.amqp.Symbol;
+import org.apache.qpid.proton.amqp.messaging.Accepted;
 import org.apache.qpid.proton.amqp.messaging.AmqpValue;
 import org.apache.qpid.proton.amqp.messaging.Rejected;
 import org.apache.qpid.proton.amqp.transaction.Declare;
@@ -82,6 +83,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler {
             if (discharge.getFail()) {
                try {
                   sessionSPI.rollbackCurrentTX(true);
+                  delivery.disposition(new Accepted());
                }
                catch (Exception e) {
                   throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorRollingbackCoordinator(e.getMessage());
@@ -90,6 +92,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler {
             else {
                try {
                   sessionSPI.commitCurrentTX();
+                  delivery.disposition(new Accepted());
                }
                catch (ActiveMQAMQPException amqpE) {
                   throw amqpE;
@@ -99,7 +102,6 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler
{
                }
             }
          }
-
       }
       catch (ActiveMQAMQPException amqpE) {
          delivery.disposition(createRejected(amqpE.getAmqpError(), amqpE.getMessage()));


Mime
View raw message