protected void setupDeployer(final LaContainer configurationContainer) {
   if (configurationContainer.hasComponentDef(ComponentDeployerFactory.Provider.class)) {
     ComponentDeployerFactory.setProvider(
         (ComponentDeployerFactory.Provider)
             configurationContainer.getComponent(ComponentDeployerFactory.Provider.class));
   }
 }
 protected void setupAssembler(final LaContainer configurationContainer) {
   if (configurationContainer.hasComponentDef(AssemblerFactory.Provider.class)) {
     AssemblerFactory.setProvider(
         (AssemblerFactory.Provider)
             configurationContainer.getComponent(AssemblerFactory.Provider.class));
   }
 }
 protected void setupBehavior(final LaContainer configurationContainer) {
   if (configurationContainer.hasComponentDef(LaContainerBehavior.Provider.class)) {
     LaContainerBehavior.setProvider(
         (LaContainerBehavior.Provider)
             configurationContainer.getComponent(LaContainerBehavior.Provider.class));
   }
 }
 protected LaContainerBuilder createDefaultBuilder(final LaContainer configurationContainer) {
   if (configurationContainer.hasComponentDef(DEFAULT_BUILDER_NAME)) {
     return (LaContainerBuilder) configurationContainer.getComponent(DEFAULT_BUILDER_NAME);
   }
   if (configurationContainer.hasComponentDef(ResourceResolver.class)
       && defaultBuilder instanceof AbstractLaContainerBuilder) {
     final ResourceResolver resolver =
         (ResourceResolver) configurationContainer.getComponent(ResourceResolver.class);
     ((AbstractLaContainerBuilder) defaultBuilder).setResourceResolver(resolver);
   }
   return defaultBuilder;
 }
 protected static void doConfigure(String configFile) {
   show("...Reading {}", configFile);
   final LaContainerBuilder builder = newConfigurationContainerBuilder();
   configurationContainer = builder.build(configFile);
   configurationContainer.init();
   final Configurator configurator;
   if (configurationContainer.hasComponentDef(Configurator.class)) {
     configurator = (Configurator) configurationContainer.getComponent(Configurator.class);
   } else {
     configurator = newDefaultConfigurator();
   }
   configurator.configure(configurationContainer);
 }
 // ===================================================================================
 //                                                                             Destroy
 //                                                                             =======
 public static synchronized void destroy() {
   defaultBuilder = null;
   provider = null;
   if (configurationContainer != null) {
     configurationContainer.destroy();
   }
   configurationContainer = null;
   initialized = false;
 }
 protected LaContainerProvider createProvider(final LaContainer configurationContainer) {
   if (configurationContainer.hasComponentDef(LaContainerProvider.class)) {
     return (LaContainerProvider) configurationContainer.getComponent(LaContainerProvider.class);
   } else if (provider instanceof LaContainerDefaultProvider) {
     final LaContainerDefaultProvider dp = (LaContainerDefaultProvider) provider;
     if (configurationContainer.hasComponentDef(PathResolver.class)) {
       dp.setPathResolver(
           (PathResolver) configurationContainer.getComponent(PathResolver.class));
     }
     if (configurationContainer.hasComponentDef(ExternalContext.class)) {
       dp.setExternalContext(
           (ExternalContext) configurationContainer.getComponent(ExternalContext.class));
     }
     if (configurationContainer.hasComponentDef(ExternalContextComponentDefRegister.class)) {
       dp.setExternalContextComponentDefRegister(
           (ExternalContextComponentDefRegister)
               configurationContainer.getComponent(ExternalContextComponentDefRegister.class));
     }
   }
   return provider;
 }