public TXStateProxy beginJTA() {
    checkClosed();
    TXId id = getNewTXId();
    TXStateProxy newState = null;

    if (isDistributed()) {
      newState = new DistTXStateProxyImplOnCoordinator(cache, this, id, true, statisticsClock);
    } else {
      newState = new TXStateProxyImpl(cache, this, id, true, statisticsClock);
    }
    setTXState(newState);
    return newState;
  }
Build a new {@link TXId}, use it as part of the transaction state and associate with the
current thread using a {@link ThreadLocal}. Flag the transaction to be enlisted with a JTA
Transaction. Should only be called in a context where we know there is no existing transaction.
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java