docs: public IHttpSessionContext getSessionContext(DeployedModule webModuleConfig, WebApp ctx, 
                                                   String vhostName,  ArrayList sessionRelatedListeners[]) throws Throwable {  
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[GET_SESSION_CONTEXT]);
          }
          if (!initialized)
              initialize(); 
          
          boolean sessionSharing = getSharing(ctx);
  
          //gets the appropriate appKey to use as a key for the sessionContexts
          //This takes into consideration sessionSharing
          String appKey = getAppKey(vhostName, webModuleConfig, sessionSharing, false);//sessionSharing);
          String appSessionAppKey = getAppKey(vhostName, webModuleConfig, sessionSharing, true); //true is to tell us to use either the applevel or BLA level
  
          SessionManagerConfig smc = getSMC(webModuleConfig); 
  
          // cmd LIDB2842 - start block
          //  Use global sessions only if session management config has
          //  not been overridden at the EAR or WAR level.  If the session
          //  management config HAS been overridden, issue info message and
          //  give the app its own context so its sessions will not be global.
          //  This behavior was necessary because the admin application requires
          //  its own config to ensure it always runs session-in-memory.
          //
          if ((_globalSessionContext) && (smc.isUsingWebContainerSM())) {
              appKey = "GLOBAL_HTTP_SESSION_CONTEXT";
              sessionSharing = true;
          } else if (_globalSessionContext) {
              String parm[] = { appKey};
              LoggingUtil.SESSION_LOGGER_CORE.logp(Level.INFO, methodClassName, methodNames[GET_SESSION_CONTEXT], "SessionContextRegistry.SessionNotGlobalForWebApp", parm);
          }
  
          //cloning to support programmatic session cookie configuration
          //always clone!!!
          smc = smc.clone();
          //don't set here as we're still using the base config - just changing the cookie/url properties
          //smc.setUsingWebContainerSM(false);
          if (smc.isUseContextRootForSessionCookiePath()) {
              //setting the cookie path to the context path
              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                  LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[GET_SESSION_CONTEXT], "Setting the cookie path to \""+ctx.getContextPath()+"\" for application - "+ appKey);
              }
              smc.setSessionCookiePath(ctx.getContextPath());
          }
          if (!ctx.getConfiguration().isModuleSessionTrackingModeSet()) {
              EnumSet<SessionTrackingMode> trackingModes = EnumSet.noneOf(SessionTrackingMode.class);
              if (smc.getEnableCookies()) {
                  trackingModes.add(SessionTrackingMode.COOKIE);
              }
              if (smc.getEnableUrlRewriting()) {
                  trackingModes.add(SessionTrackingMode.URL);
              }
              if (smc.useSSLId()) {
                  trackingModes.add(SessionTrackingMode.SSL);
              }
              ctx.getConfiguration().setDefaultSessionTrackingMode(trackingModes);
          }
  
          IHttpSessionContext iSctx = (IHttpSessionContext) scrSessionContexts.get(appKey);
  
          if (iSctx != null) {
              LoggingUtil.SESSION_LOGGER_CORE.logp(Level.INFO, methodClassName, methodNames[GET_SESSION_CONTEXT], "SessionContextRegistry.existingContext", appKey);
              SessionContext wsCtx = (SessionContext) iSctx;
              if (sessionSharing)
                  wsCtx.incrementRefCount();
          } else {
              LoggingUtil.SESSION_LOGGER_CORE.logp(Level.INFO, methodClassName, methodNames[GET_SESSION_CONTEXT], "SessionContextRegistry.newContext", appKey);
              ClassLoader sessionClassLoader = getSessionClassLoader(webModuleConfig);
              iSctx = createSessionContext(
                                           appKey,
                                           isDistributable(webModuleConfig),
                                           isAllowDispatchRemoteInclude(webModuleConfig),
                                           ctx,
                                           sessionClassLoader,
                                           smc,
                                           getJ2EEName(webModuleConfig),
                                           sessionSharing,
                                           appSessionAppKey);
          }
  
          //make sure they are the same object
          ctx.getConfiguration().setSessionCookieConfig(iSctx.getWASSessionConfig().getSessionCookieConfig());
          //clone in SessionContext does not update this smc object but the _smc object in SessionContext
          //ctx.getConfiguration().setSessionManagerConfigBase(smc);
          ctx.getConfiguration().setSessionManagerConfig(iSctx.getWASSessionConfig());
  
          ArrayList sessionListeners = sessionRelatedListeners[0];  
          ArrayList sessionAttrListeners = sessionRelatedListeners[1];  
          ArrayList sessionIdListeners = sessionRelatedListeners[2];  // Servlet 3.1 
  
          String j2eeName = null;
          if ((_globalSessionContext && sessionSharing) || ((SessionContext)iSctx)._sap.getHasApplicationSession()) {
              // for global session, pass j2eename with listeners so we can stop listeners for each app
              j2eeName = getJ2EEName(webModuleConfig); 
          }
          //  add listeners to session context
          SessionContext sessCtx = (SessionContext)iSctx;
          sessCtx.addHttpSessionListener(sessionListeners, j2eeName);  
          
          // Servlet 3.1
          if (!sessionIdListeners.isEmpty()) {
             addHttpSessionIdListeners(sessionIdListeners, j2eeName, sessCtx);      
          }
          sessCtx.addHttpSessionAttributeListener(sessionAttrListeners, j2eeName);  
          
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[GET_SESSION_CONTEXT], iSctx);
          }
          return iSctx;
      }