docs: @SuppressWarnings("unchecked")
      @Override
      public void addWebApplication(DeployedModule deployedModule, List extensionFactories) throws WebAppNotLoadedException {
         
          com.ibm.ws.webcontainer.osgi.container.DeployedModule deployedModuleImpl = (com.ibm.ws.webcontainer.osgi.container.DeployedModule) deployedModule;
          String ct = deployedModuleImpl.getProperContextRoot();
          String contextRoot = deployedModuleImpl.getMappingContextRoot();
  
          String displayName = deployedModule.getDisplayName();
          
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
              logger.logp(Level.FINE, CLASS_NAME,"addWebApplication",  "enter ["+ displayName +"]");
          }
  
  
          WebGroup webGroup = (WebGroup) requestMapper.map(contextRoot);
  
          if (webGroup != null && ct.equalsIgnoreCase(webGroup.getConfiguration().getContextRoot())) {
              // begin 296368 Nested exceptions lost for problems during
              // application startup WAS.webcontainer
              List list = webGroup.getWebApps();
              String originalName = "";
              if (list != null && (list.size() > 0)) {
                  WebApp originalWebApp = (WebApp) list.get(0);
                  originalName = originalWebApp.getWebAppName();
              }
              logger.logp(Level.SEVERE, CLASS_NAME, "addWebApplication", "context.root.already.in.use", new Object[] { displayName, contextRoot, originalName, displayName });
              throw new WebAppNotLoadedException("Context root " + contextRoot + " is already bound. Cannot start application " + displayName);
              // end 296368 Nested exceptions lost for problems during application
              // startup WAS.webcontainer
          }
          // The following is used by/for Liberty: requred to create the webgroup & 
          // webgroup configuration
          webGroup = new WebGroup(contextRoot, this);
          WebGroupConfiguration wgConfig = new WebGroupConfiguration(deployedModule.getName());
          wgConfig.setContextRoot(deployedModule.getContextRoot());
          wgConfig.setVersionID(deployedModule.getWebAppConfig().getVersion());
          // begin LIDB2356.1: WebContainer work for incorporating SIP
  
          // Liberty: if this is one of the "new" WebAppConfiguration objects,
          // add this as the virtual host for better delegation (and less object copying)
          com.ibm.ws.webcontainer.webapp.WebAppConfiguration baseAppConfig = deployedModule.getWebAppConfig();
          try {
              ((com.ibm.ws.webcontainer.osgi.webapp.WebAppConfiguration) baseAppConfig).setVirtualHost(this);
          } catch (ClassCastException cce) {
              baseAppConfig.setVirtualHostName(getName());
          }
  
          wgConfig.setWebAppHost(this);
          // end LIDB2356.1: WebContainer work for incorporating SIP
          webGroup.initialize(wgConfig);
          try {
              webGroup.addWebApplication(deployedModule, extensionFactories);
              Object[] args = { displayName, vHostConfig.toString() };
              logger.logp(Level.INFO, CLASS_NAME, "addWebApplication", "module.[{0}].successfully.bound.to.virtualhost.[{1}]", args);
          } catch (Throwable t) {
              //PI58875
              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
                  logger.logp(Level.FINE, CLASS_NAME,"addWebApplication",  "error adding web app ["+ displayName +"]");
              }
              webGroup.destroy();  //preventing the classLoader memory leak
              webGroup = null;
              //PI58875 end 
  
              // requestMapper.removeMapping(contextRoot);
              // Do not need to remove mapping because we wait until we're sure we should add it!
              // PK67698 removeMapping(contextRoot);
              // 296368 added rootCause to newly created exception.
              throw new WebAppNotLoadedException(t.getMessage(), t);
          }
  
          // PK67698 Start
          try {
              addMapping(contextRoot, webGroup);
  
              webGroup.notifyStart();
          } catch (Exception exc) {
              // begin 296368 Nested exceptions lost for problems during
              // application startup WAS.webcontainer
              if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                  logger.logp(Level.FINE, CLASS_NAME, "addWebApplication", "error adding mapping ", exc); /* @283348.1 */
              }
              webGroup.destroy();
              throw new WebAppNotLoadedException("Context root " + contextRoot + " mapping unable to be bound. Application " + displayName + " unavailable.", exc);
              // end 296368 Nested exceptions lost for problems during application
              // startup WAS.webcontainer
          }
          // PK67698 End
      }