code: protected synchronized IHttpSessionContext createSessionContext(
                                                                    String appName,
                                                                    boolean distributableWebApp, boolean allowDispatchRemoteInclude, 
                                                                    WebApp sc, ClassLoader appCl,
                                                                    SessionManagerConfig smc, String j2eeName,
                                                                    boolean sessionSharing, String applicationSessionAppName) throws Throwable {
  
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[CREATE_SESSION_CONTEXT]);
          }
          // ensure no other thread just finished creating
          IHttpSessionContext sessCtx = (IHttpSessionContext)scrSessionContexts.get(appName);
          if (sessCtx == null) {
              WebAppConfiguration webAppConfig=sc.getConfiguration();
              SessionApplicationParameters sap = new SessionApplicationParameters(appName, 
                                                                                  webAppConfig.isModuleSessionTimeoutSet(),
                                                                                  webAppConfig.getSessionTimeout(),
                                                                                  distributableWebApp, 
                                                                                  allowDispatchRemoteInclude, 
                                                                                  sc, 
                                                                                  appCl, 
                                                                                  j2eeName, 
                                                                                  webAppConfig.getSessionCookieConfig(), 
                                                                                  webAppConfig.isModuleSessionTrackingModeSet(), 
                                                                                  webAppConfig.getSessionTrackingMode());
              if(webAppConfig.getSessionCookieConfig()!=null) {
                  webAppConfig.setHasProgrammaticCookieConfig(); // in tWAS, this happens in SessionApplicationParameters(...)
              }
              
              //if session sharing or Servlet21Compatibility (the var sessionSharing should be true) - don't create appSession
              //and calls to getIBMApplicationSession will return null
              if (!sessionSharing) {
                  sap.setHasApplicationSession(true);
                  sap.setApplicationSessionName(applicationSessionAppName);
              }
              sessCtx = createSessionContextObject(smc, sap);
              scrSessionContexts.put(appName, sessCtx);
          }
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
              LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[CREATE_SESSION_CONTEXT]);
          }
          return sessCtx;
      }
docs: /*
  Create a new session context