docs: public IGenericSessionManager createCoreSessionManager(boolean removeAttrOnInvalidate) {
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[CREATE_CORE_SESSION_MANAGER], "appName = " + _sap.getAppName());
          }
  
          String _sessionManagerID = _sap.getAppName();
          /*
           * create the session manager
           */
          IGenericSessionManager _sessionManager = new SessionManager(_sessionManagerID);
          /*
           * Get a handle to the SessionManagerCustomizer and
           * customize the session manager.
           */
          ISessionManagerCustomizer sessionMgrCustomizer = _sessionManager.getSessionManagerCustomizer();
  
          // servlet context
          sessionMgrCustomizer.setServletContext(_sap.getServletContext());
  
          // id generator
          sessionMgrCustomizer.setIDGenerator(new IDGeneratorImpl(SessionManagerConfig.getSessionIDLength()));
  
          // cookie config
          SessionCookieConfigImpl sessionCookieConfig = _sap.getSessionCookieConfig();
          if (sessionCookieConfig != null) {
              _smc.updateCookieInfo(sessionCookieConfig);
          }
  
          // tracking mode
          EnumSet<SessionTrackingMode> trackingMode = _sap.getSessionTrackingModes();
          if (trackingMode != null) {
              _smc.updateTrackingMode(trackingMode);
          }
  
          // session timeout
          long sessionTimeout = _sap.getSessionTimeout();
          if (sessionTimeout == 0) { // no value from web.xml
              sessionTimeout = _smc.getSessionInvalidationTime();
          }
          sessionTimeout = checkMinimumInvalidation(sessionTimeout);
          sessionMgrCustomizer.setSessionTimeout((int) sessionTimeout);
  
          // protocol adapter
          IProtocolAdapter adapter = new WasHttpSessionAdapter(this, _sap.getServletContext());
          sessionMgrCustomizer.setAdapter(adapter);
  
          // session listeners
          // only call new constructor if we actually have SessionidListeners
          if( mHttpSessionIdListeners == null ) {
              wasHttpSessionObserver = new WasHttpSessionObserver(mHttpSessionListeners, adapter);
          } else {
              wasHttpSessionObserver = new WasHttpSessionObserver(mHttpSessionListeners, mHttpSessionIdListeners, adapter);
          }
         
          sessionMgrCustomizer.registerSessionObserver(wasHttpSessionObserver);
  
          // session attribute listeners
          sessionMgrCustomizer.registerSessionStateObserver(new HttpSessionAttributeObserver(mHttpSessionAttributeListeners, adapter));
  
          // store
          IStore _store = null;
          if(!removeAttrOnInvalidate){
                 _store = createStore(_smc, _sessionManagerID, _sap.getServletContext(), false);
          }
          else{
              _store = createStore(_smc, _sessionManagerID, _sap.getServletContext(), false , removeAttrOnInvalidate);
          }
          _store.setDistributable(_sap.getDistributableWebApp());
          sessionMgrCustomizer.registerStore(_store);
  
          // invalidator
          _invalidator = createInvalidator();
          int reaperInterval = getReaperInterval(sessionTimeout);
          _invalidator.start(_store, reaperInterval);
  
          // storer - handles manual write, eos, and time based differences
          _storer = createStorer(_smc, _store);
          sessionMgrCustomizer.registerStorer(_storer);
  
          // affinity manager
          ISessionAffinityManager isam = createSessionAffinityManager(_smc, this, _store);
          sessionMgrCustomizer.registerAffinityManager(isam);
          _sam = isam;
  
          // zOS servant affinity
          ISessionObserver servantAffinityManager = getServantAffinityManager(_smc, adapter, _sap.getAppName());
          if (servantAffinityManager != null) {
              sessionMgrCustomizer.registerSessionObserver(servantAffinityManager);
          }
  
          SessionManagerRegistry.getSessionManagerRegistry().registerSessionManager(_sessionManagerID, _sessionManager);
  
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[CREATE_CORE_SESSION_MANAGER], "_sessionManager =" + _sessionManager);
          }
          return _sessionManager;
      }