code: public TemplateCompilationResults reloadContextAndTemplates(boolean all)
          throws Exception {
  
          // Create the new merged context source
          TeaServletContextSource contextSource =
              new TeaServletContextSource(
                  mApplicationDepot.getClass().getClassLoader(),
                  mApplicationDepot,
                  getServletContext(),
                  getLog(),
                  true,
                  mProperties.getBoolean("management.httpcontext", false),
                  mProperties.getInt("management.httpcontext.readUrlCacheSize", 500),
                  isProfilingEnabled());
  
          // Create a new template source using the newly loaded context
          // source from the new application depot
          TeaServletTemplateSource templateSrc =
              createTemplateSource(contextSource);
  
          // Recompile all templates using the new context source
          TemplateCompilationResults results =
              templateSrc.compileTemplates(null, all);
  
          // The new context source and template source are ready for
          // use, set the member variables
          synchronized(this) {
              mApplicationDepot.setContextSource(contextSource);
              mTemplateSource = templateSrc;
          }
  
          // Return the compilation results
          return results;
      }
docs: This method performs the steps necessary to load a new/updated
  context source.  It does not swap the mTemplateSource member
  until it is fully initialized (its templates have been
  compiled).