docs: @Override
      public void runInvalidation() {
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[RUN_INVALIDATION], appNameForLogging);
          }
          /*
           * if (_isApplicationSessionStore) {
           * runApplicationStoreInvalidation();
           * } else {
           */
          long nowTime = System.currentTimeMillis();
          Iterator iter = _sessions.keySet().iterator();
          try {
              //setThreadContext threw a NPE because we were trying to get the config from within getModuleMetaData and it was returning null
              //this only happens after the app has been shutdown.  There was a small timing window where this was possible.
              //Anyway, we're going to check for isInProcessOfStopping, but there could still be a timing window.  So, we are going to call a different
              //setThreadContext method that will not log the errors and we will log it here only if we are not in the process of stopping  
              if (this.isInProcessOfStopping()) { 
                  if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[RUN_INVALIDATION], "application in the process of stopping - " + appNameForLogging);
                  }
                  return;
              }
              // PK99859: Set the thread context
              try {
                  setThreadContextDuringRunInvalidation();
              } catch (RuntimeException e) {
                  if (!this.isInProcessOfStopping()) {
                      //the exception is only expected if we are in the process of stopping the application
                      //therefore, if we have not stopped the app, report the error
                      LoggingUtil.SESSION_LOGGER_CORE.logp(Level.SEVERE, MemoryStore.class.getSimpleName(), methodNames[RUN_INVALIDATION], "CommonMessage.exception", e);
                  }
                  return;
              }
              while (iter.hasNext()) {
                  String key = (String) iter.next();
                  ISession s = (ISession) _sessions.get(key);
  
                  // sync on the session and check if its active...
                  if (s != null) {
                      synchronized (s) {
                          if (s.isValid()) {
                              if (s.getMaxInactiveInterval() != -1) {
                                  long currentAccessTime = s.getCurrentAccessTime(); // currentAccessTime
                                                                                     // updated on
                                                                                     // session
                                                                                     // access
                                                                                     // lastAccessedTime
                                                                                     // updated at
                                                                                     // releaseSession
                                  long maxinact = 1000 * (long) s.getMaxInactiveInterval();
                                  boolean active = s.getRefCount() > 0;
                                  if (_isApplicationSessionStore) {
                                      // the RefCount is not correct when dealing with an
                                      // applicationSessionStore
                                      s.setRefCount(0);
                                      active = false;
                                  }
                                  boolean timedOut = (currentAccessTime <= nowTime - maxinact);
                                  /*
                                   * invalidate if:
                                   * session has timedOut AND (is not active OR (the Invalidation
                                   * Multiple has not been set to 0
                                   * and the session is that many times the invalidation interval)
                                   * 
                                   * The default value for the invalidation interval is 3.
                                   * 
                                   * PK03711 removed check for active and always invalidated
                                   * timedout sessions for v6.1 and earlier
                                   * v7 CTS defect 391577 forced us to put this code back, so we
                                   * introduced the InvalidateIfActive property
                                   * In the service stream, the ForceSessionInvalidationMultiple was
                                   * used, so we are using the same property
                                   */
                                  if ((timedOut)
                                      && ((!active) || ((_smc.getForceSessionInvalidationMultiple() != 0) && (currentAccessTime <= nowTime
                                                                                                                                   - (_smc.getForceSessionInvalidationMultiple() * maxinact))))) {
  
                                      _storeCallback.sessionInvalidatedByTimeout(s);
                                      if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                                          String message = "Going to invalidate session with id=" + s.getId();
                                          LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[RUN_INVALIDATION], message);
                                      }
                                      s.invalidate();
                                  }
                              }
                          } // isValid
                      }
                  }
              } // end "while"
          } finally {
              // PK99859: Unset the thread context
              unsetThreadContext();
          }
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[RUN_INVALIDATION]);
          }
      }