if (xid != null) {
// associate
associatedXid = xid;
activeXid = new ActiveMQXid(xid);
XATransactionInfo info = new XATransactionInfo();
info.setXid(activeXid);
info.setType(XATransactionInfo.START);
try {
this.connection.asyncSendPacket(info);
if( log.isDebugEnabled() )
log.debug("Started XA transaction: "+activeXid);
} catch (JMSException e) {
throw toXAException(e);
}
} else {
if( activeXid!=null ) {
XATransactionInfo info = new XATransactionInfo();
info.setXid(activeXid);
info.setType(XATransactionInfo.END);
try {
this.connection.syncSendPacket(info);
if( log.isDebugEnabled() )
log.debug("Ended XA transaction: "+activeXid);
} catch (JMSException e) {