docs: public synchronized void stop() {
          if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
              LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[STOP]);
          }
          inProcessOfStopping = true;
  
          sessionStoreService.setCompletedPassivation(false); // 128284
          //This is only executed for Time-based writes ... not for manual or End-Of-Service writes
          if (_smc.getEnableTimeBasedWrite()) {
              ((BackedHashMap) _sessions).doTimeBasedWrites(true);
          }
  
          // We'll get here for:
          //  1) Stop server
          //  2) Stop Application/ear
          //  3) Restart Application/ear
  
          // Look at all cached sessions and passivate them if necessary
          Enumeration vEnum = tableKeys();
          while (vEnum.hasMoreElements()) {
              String id = (String) vEnum.nextElement();
              BackedSession s = (BackedSession) ((BackedHashMap) _sessions).superGet(id);
              _storeCallback.sessionWillPassivate(s);
              //in case you update the session during passivation
              if (_smc.getPersistSessionAfterPassivation()) {
                  //Need to also write the session if passivate updated any attributes.
                  if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                      LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[STOP], "Persisting the session after it was passivated. " + s.getAppNameAndID());
                  }
                  s.removingSessionFromCache = true;
                  s.sync();
                  //sync calls this: ((BackedHashMap)_sessions).put(id, s);
                  s.removingSessionFromCache = false;
              }
          }
  
          sessionStoreService.setCompletedPassivation(true); // 128284
  
          if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
              LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[STOP]);
          }
      }