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: added Openwire XA end call
Date Tue, 28 Jul 2015 13:50:56 GMT
added Openwire XA end call


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

Branch: refs/heads/master
Commit: abcde1c1f3674e4f8696b68ddfbb59498a2118d8
Parents: d002da8
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Tue Jul 28 09:06:40 2015 +0100
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Jul 28 09:50:29 2015 -0400

----------------------------------------------------------------------
 .../core/protocol/openwire/OpenWireConnection.java     |  1 +
 .../protocol/openwire/OpenWireProtocolManager.java     | 11 +++++++++++
 .../artemis/core/protocol/openwire/amq/AMQSession.java | 13 +++++++++++++
 3 files changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/abcde1c1/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
index d943af1..6c6bff3 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
@@ -1356,6 +1356,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor
    @Override
    public Response processEndTransaction(TransactionInfo info) throws Exception
    {
+      protocolManager.endTransaction(info);
       TransactionId txId = info.getTransactionId();
 
       if (!txMap.containsKey(txId))

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/abcde1c1/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
index 15cb9e2..d245985 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
@@ -711,6 +711,17 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>,
No
       server.destroyQueue(new SimpleString(q));
    }
 
+
+   public void endTransaction(TransactionInfo info) throws Exception
+   {
+      AMQSession txSession = transactions.get(info.getTransactionId());
+
+      if (txSession != null)
+      {
+         txSession.endTransaction(info);
+      }
+   }
+
    public void commitTransactionOnePhase(TransactionInfo info) throws Exception
    {
       AMQSession txSession = transactions.get(info.getTransactionId());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/abcde1c1/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
index 4f951fe..ef64b6c 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
@@ -396,6 +396,19 @@ public class AMQSession implements SessionCallback
       this.isTx = true;
    }
 
+
+   public void endTransaction(TransactionInfo info) throws Exception
+   {
+      checkTx(info.getTransactionId());
+
+      if (txId.isXATransaction())
+      {
+         XATransactionId xid = (XATransactionId) txId;
+         XidImpl coreXid = new XidImpl(xid.getBranchQualifier(), xid.getFormatId(), xid.getGlobalTransactionId());
+         this.coreSession.xaEnd(coreXid);
+      }
+   }
+
    public void commitOnePhase(TransactionInfo info) throws Exception
    {
       checkTx(info.getTransactionId());


Mime
View raw message