{ log.error("Transaction already exists:" + xid); throw new XAException(XAException.XAER_DUPID);
{ throw new MessagingXAException(XAException.XAER_DUPID, "Transaction already exists:" + xid);
   public Xid convertTx(LocalTxXid anonXid, Xid xid) throws XAException   {      if (trace) { log.trace("converting " + anonXid + " to " + xid); }      TxState state = getTx(anonXid);      if (state == null)      {         log.error("Cannot find transaction with xid:" + anonXid);                  throw new XAException(XAException.XAER_NOTA);      }      state = getTx(xid);      if (state != null)      {         log.error("Transaction already exists:" + xid);                  throw new XAException(XAException.XAER_DUPID);      }      TxState s = removeTx(anonXid);      transactions.put(xid, s);      return xid;   }