docs: public static void setTimeout(TransactionImpl tran, int timeoutType, int seconds)
      {
          final boolean traceOn = TraceComponent.isAnyTracingEnabled();
  
          if (traceOn && tc.isEntryEnabled())
              Tr.entry(tc, "setTimeout", new Object[] { tran, timeoutType, seconds });
  
          // assert tran != null ... throw IllegalArgumentException ???
          if (tran == null)
              throw new IllegalArgumentException("setTimeout called with null tran");
  
          com.ibm.tx.jta.impl.TimeoutManager.TimeoutInfo info = null;
  
          switch (timeoutType)
          {
          // If the new type is active or in_doubt, then create a new TimeoutInfo
          // if
          // necessary, and set up the type and interval.
              case TimeoutManager.ACTIVE_TIMEOUT:
              case TimeoutManager.IN_DOUBT_TIMEOUT:
              case TimeoutManager.REPEAT_TIMEOUT:
                  info = tran.setTimeoutInfo(new TimeoutInfo(tran, seconds, timeoutType));
  
                  if (traceOn && tc.isDebugEnabled() && info != null
                      && timeoutType != TimeoutManager.REPEAT_TIMEOUT)
                      Tr.debug(tc, "Found existing timeout for transaction: " + info);
                  // not expecting this, should we cancel it?
  
                  break;
  
              case TimeoutManager.INACTIVITY_TIMEOUT:
                  if (seconds == 0) // cancel
                  {
                      info = inactivityTimeouts.remove(tran);
                      if (null != info)
                      {
                          info.cancelAlarm();
                      }
                      else
                      {
                          if (traceOn && tc.isDebugEnabled())
                              Tr.debug(tc,
                                       "Failed to find existing timeout for transaction: "
                                                       + tran);
                      }
                  }
                  else
                  {
                      info = new TimeoutInfo(tran, seconds, timeoutType);
                      info = inactivityTimeouts.put(tran, info);
  
                      if (traceOn && tc.isDebugEnabled() && info != null)
                          Tr.debug(tc,
                                   "Found existing inactivity timeout for transaction: "
                                                   + info);
                      // not expecting this, should we cancel it?
                  }
  
                  break;
  
              // For any other type, remove the timeout if there is one.
              default:
                  info = tran.setTimeoutInfo(null);
                  if (null != info)
                  {
                      info.cancelAlarm();
                  }
                  else
                  {
                      if (traceOn && tc.isDebugEnabled())
                          Tr.debug(tc,
                                   "Failed to find existing timeout for transaction: "
                                                   + tran);
                  }
  
                  break;
          }
  
          if (traceOn && tc.isEntryEnabled())
              Tr.exit(tc, "setTimeout");
      }