code: public void start(Xid xid, int flags) throws XAException {
      if (flags != TMJOIN && flags != TMRESUME && flags != TMNOFLAGS) {
        throw new XAException(XAException.XAER_INVAL);
      }
      execute("XA START " + xidToString(xid) + " "
          + flagsToString(
          flags == TMJOIN && connection.getPinGlobalTxToPhysicalConnection() ? TMRESUME : flags));
    }
docs: Starts work on behalf of a transaction branch specified in xid. If TMJOIN is specified, the
  start applies to joining a transaction previously seen by the resource manager. If TMRESUME is
  specified, the start applies to resuming a suspended transaction specified in the parameter
  xid. If neither TMJOIN nor TMRESUME is specified and the transaction specified by xid has
  previously been seen by the resource manager, the resource manager throws the XAException
  exception with XAER_DUPID error code.
  
  @param xid   A global transaction identifier to be associated with the resource.
  @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
  @throws XAException An error has occurred.