public int prepare(Xid xid) throws XAException
public int prepare(Xid xid, ConnectionDelegate connection) throws XAException
   public int prepare(Xid xid) throws XAException   {      if (log.isTraceEnabled()) { log.trace("Preparing xid=" + xid); }            TxState state = getTx(xid);      if (state == null)      {         log.error("Cannot find transaction with xid:" + xid);                  throw new XAException(XAException.XAER_NOTA);      }       TransactionRequest request = new TransactionRequest();      request.requestType = TransactionRequest.TWO_PHASE_COMMIT_PREPARE_REQUEST;      request.txInfo = state;      request.xid = xid;      sendTransactionXA(request);            state.state = TxState.TX_PREPARED;      return XAResource.XA_OK;   }