long setTransactionTimeoutForXARes(int seconds) throws SystemException {

    XAResource xar = null;
    boolean resetXATimeOut = true;
    Map.Entry entry;
    synchronized (resourceMap) {
      for (final Object o : resourceMap.entrySet()) {
        entry = (Map.Entry) o;
        xar = (XAResource) entry.getKey();
        if ((Boolean) entry.getValue()) {
          try {
            resetXATimeOut = xar.setTransactionTimeout(seconds);
          } catch (XAException e) {
            String exception =
                String.format(
                    "Exception occurred while trying to set the XAResource TimeOut due to %s Error code, %s",
                    e, e.errorCode);
            LogWriter writer = TransactionUtils.getLogWriter();
            if (VERBOSE) {
              writer.fine(exception);
            }
            throw new SystemException(exception);
          }
          break;
        }
      }
    }
    long newExp = System.currentTimeMillis() + (seconds * 1000L);
    if (!resetXATimeOut) {
      newExp = -1;
    }
    return newExp;
  }
Set the transaction TimeOut of the Global Transaction Asif : It returns the new expiry time for
the GTX.
geode-core/src/main/java/org/apache/geode/internal/jta/GlobalTransaction.java