mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-23 02:44:10 +00:00
This closes #96 Openwire XA fix
This commit is contained in:
commit
c8d053ede8
@ -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))
|
||||
|
@ -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());
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user