use of org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionXAResponseMessage in project activemq-artemis by apache.
the class ActiveMQSessionContext method xaCommit.
@Override
public void xaCommit(Xid xid, boolean onePhase) throws XAException, ActiveMQException {
SessionXACommitMessage packet = new SessionXACommitMessage(xid, onePhase);
SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(packet, PacketImpl.SESS_XA_RESP);
if (response.isError()) {
throw new XAException(response.getResponseCode());
}
if (logger.isTraceEnabled()) {
logger.trace("finished commit on " + ClientSessionImpl.convert(xid) + " with response = " + response);
}
}
use of org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionXAResponseMessage in project activemq-artemis by apache.
the class ActiveMQSessionContext method xaPrepare.
@Override
public int xaPrepare(Xid xid) throws XAException, ActiveMQException {
SessionXAPrepareMessage packet = new SessionXAPrepareMessage(xid);
SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(packet, PacketImpl.SESS_XA_RESP);
if (response.isError()) {
throw new XAException(response.getResponseCode());
} else {
return response.getResponseCode();
}
}
Aggregations