code: public void commit(Xid xid, boolean onePhase) throws XAException {
      String command = "XA COMMIT " + xidToString(xid);
      if (onePhase) {
        command += " ONE PHASE";
      }
      execute(command);
    }
docs: Commits the global transaction specified by xid.
  
  @param xid      A global transaction identifier
  @param onePhase If true, the resource manager should use a one-phase commit protocol to commit
  the work done on behalf of xid.
  @throws XAException exception