Package org.impalaframework.module

Examples of org.impalaframework.module.DelegatingContextLoader


    Assert.notNull(moduleLoaderRegistry, ModuleLoaderRegistry.class.getName() + " cannot be null");
    ConfigurableApplicationContext context = null;
   
    final ModuleLoader moduleLoader = moduleLoaderRegistry.getModuleLoader(definition.getType(), false);
    final DelegatingContextLoader delegatingLoader = moduleLoaderRegistry.getDelegatingLoader(definition.getType());

    try {

      if (moduleLoader != null) {
        if (logger.isDebugEnabled()) logger.debug("Loading module " + definition + " using ModuleLoader " + moduleLoader);
        context = loadApplicationContext(moduleLoader, parent, definition);
        moduleLoader.afterRefresh(context, definition);
      }
      else if (delegatingLoader != null) {
        if (logger.isDebugEnabled()) logger.debug("Loading module " + definition + " using DelegatingContextLoader " + moduleLoader);
        context = delegatingLoader.loadApplicationContext(parent, definition);
      }
      else {
        throw new ConfigurationException("No " + ModuleLoader.class.getName() + " or "
            + DelegatingContextLoader.class.getName() + " specified for module definition type " + definition.getType());
      }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.DelegatingContextLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.