added Openwire XA end call
This commit is contained in:
parent
d002da8506
commit
abcde1c1f3
|
@ -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…
Reference in New Issue