@Override
  public void setTransactionTimeout(int timeOut) throws SystemException {
    if (timeOut < 0) {
      String exception =
          "Cannot set a negative Time Out for transactions";
      LogWriter writer = TransactionUtils.getLogWriter();
      if (writer.fineEnabled()) {
        writer.fine(exception);
      }
      throw new SystemException(exception);
    } else if (timeOut == 0) {
      timeOut = TransactionManagerImpl.DEFAULT_TRANSACTION_TIMEOUT;
    }
    if (tm.getTransaction() != null) {
      tm.setTransactionTimeout(timeOut);
    } else {
      storedTimeOut = timeOut;
    }
  }
Checks if transaction has begun. If yes, then call the tm.setTransactionTimeOut else stores and

@see javax.transaction.UserTransaction#setTransactionTimeout
geode-core/src/main/java/org/apache/geode/internal/jta/UserTransactionImpl.java