docs: @Override
      public void applicationStarting(ApplicationInfo appInfo) throws StateChangeException {
          /*
           * On twas at this point the TCCL is completely unrelated to the app that's starting. On Liberty it's a ContextFinder object.
           * This context finder is able to correctly load classes if it is invoked in any WAR inside an EAR with many wars as
           * ContextFinder will delegate loading classes to the correct ClassLoader.
           *
           * However if the TCCL is used as the key to the map, for example by DeltaSpike's configuration code. Then it will not
           * work. The same ContextFinder object will be used as a key regardless of which module DeltaSpike is looking at.
           *
           * While the ContextFinder has the advantage of being able to load classes, setting the TCCL like I do below has the advantage
           * of keeping Liberty and twas in sync.
           *
           * Given that both options have an advantage and a drawback I chose to keep the two servers in sync. And am documenting why I
           * did so with this comment.
           */
  
          ClassLoader newCL = null;
          ClassLoader oldCl = null;
  
          boolean setContext = false;
  
          try {
              Application application = this.runtimeFactory.newApplication(appInfo);
              /* if there is no app classes info then the app manager is not in control of this app */
              if (!application.hasModules()) {
                  this.runtimeFactory.removeApplication(appInfo);
                  return;
              }
              newCL = getRealAppClassLoader(application);
  
              if (newCL != null) {
                  oldCl = CDIUtils.getAndSetLoader(newCL);
              }
  
              //Because weld fires observes in all modules when endInitialization() is called
              //We can only set the jndi context once. This is sufficent for the java:app namespace
              //but not for the java module namespace. 
              	
              //Origonally I tried to setup JNDI so only application metadata was on the thread but
              //that didn't work so I use give classic utils one of the module archives.  
  
              if (application.getModuleArchives().size() > 0 && 
                      application.getApplicationMetaData() != null) {
                  CDIArchive archive = application.getModuleArchives().iterator().next();
                  beginContext(archive);
                  setContext = true;
              }
  
              for (CDIArchive archive : application.getModuleArchives()) {
                  registerDeferedMetaData(archive);
              }
  
              WebSphereCDIDeployment webSphereCDIDeployment = getCDIContainer().startInitialization(application);
              if (webSphereCDIDeployment != null) { 
                  getCDIContainer().endInitialization(webSphereCDIDeployment);//This split is just to keep the CDIContainerImpl code conistant across liberty & websphere. 
              }
          } catch (CDIException e) {
              throw new StateChangeException(e);
          } finally {
              if (oldCl != null) {
                  CDIUtils.getAndSetLoader(oldCl);
              }
              if (setContext) {
                  endContext();
              }
          }
      }