private void internalResume(TXStateProxy tx, boolean needToResumeBySameThread) {
    if (tx != null) {
      TransactionId tid = getTransactionId();
      if (tid != null) {
        throw new java.lang.IllegalStateException(
            String.format("Transaction %s already in progress",
                tid));
      }
      if (needToResumeBySameThread) {
        TXStateProxy result = txContext.get();
        if (result != PAUSED) {
          throw new java.lang.IllegalStateException(
              "try to unpause a transaction not paused by the same thread");
        }
      }
      setTXState(tx);

      tx.resume();
    } else {
      if (needToResumeBySameThread) {
        pauseJTA.set(false);
      }
    }
  }
Activates the specified transaction on the calling thread.

@param tx the transaction to activate.
@param needToResumeBySameThread whether a suspended transaction needs to be resumed by the same
       thread.
@throws IllegalStateException if this thread already has an active transaction
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java