Package org.springframework.web.context.support

Examples of org.springframework.web.context.support.GenericWebApplicationContext


        }
       
        final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
        beanFactory.setBeanClassLoader(classLoader);

        final GenericWebApplicationContext context = new GenericWebApplicationContext(beanFactory);
        context.setParent(parent);
        context.setServletContext(wrappedServletContext);
        context.setClassLoader(classLoader);
        context.setDisplayName(ModuleLoaderUtils.getDisplayName(moduleDefinition, context));
       
        configureBeanFactoryAndApplicationContext(moduleDefinition,
                beanFactory, context);
       
        return context;
View Full Code Here


    protected ModuleManagementFacade createModuleManagementFacade(ServletContext servletContext) {
        String[] locations = getBootstrapContextLocations(servletContext);
        logger.info("Loading bootstrap context from locations " + Arrays.toString(locations));

        final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
        final GenericWebApplicationContext applicationContext = new GenericWebApplicationContext(beanFactory);
        applicationContext.setServletContext(servletContext);

        XmlBeanDefinitionReader definitionReader = new XmlBeanDefinitionReader(beanFactory);
        for (int i = 0; i < locations.length; i++) {
            definitionReader.loadBeanDefinitions(new ClassPathResource(locations[i]));
        }
        applicationContext.refresh();

        return ObjectUtils.cast(applicationContext.getBean("moduleManagementFacade"), ModuleManagementFacade.class);
    }
View Full Code Here

        }
       
        final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
        beanFactory.setBeanClassLoader(classLoader);

        final GenericWebApplicationContext context = new GenericWebApplicationContext(beanFactory);
        context.setParent(parent);
        context.setServletContext(wrappedServletContext);
        context.setClassLoader(classLoader);
        context.setDisplayName(ModuleLoaderUtils.getDisplayName(moduleDefinition, context));
       
        configureBeanFactoryAndApplicationContext(moduleDefinition,
                beanFactory, context);
       
        return context;
View Full Code Here

  protected ModuleManagementFacade createModuleManagementFactory(ServletContext servletContext) {
    String[] locations = getBootstrapContextLocations(servletContext);
    logger.info("Loading bootstrap context from locations " + Arrays.toString(locations));

    final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
    final GenericWebApplicationContext applicationContext = new GenericWebApplicationContext(beanFactory);
    applicationContext.setServletContext(servletContext);

    XmlBeanDefinitionReader definitionReader = new XmlBeanDefinitionReader(beanFactory);
    for (int i = 0; i < locations.length; i++) {
      definitionReader.loadBeanDefinitions(new ClassPathResource(locations[i]));
    }
    applicationContext.refresh();

    return ObjectUtils.cast(applicationContext.getBean("moduleManagementFacade"), ModuleManagementFacade.class);
  }
View Full Code Here

* @author Phil Zoio
*/
public class WebPlaceholderDelegatingContextLoader implements DelegatingContextLoader {

    public ConfigurableApplicationContext loadApplicationContext(ApplicationContext parent, ModuleDefinition definition) {
        GenericWebApplicationContext context = new GenericWebApplicationContext();
        context.refresh();
        return context;
    }
View Full Code Here

    }
   
    final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
    beanFactory.setBeanClassLoader(classLoader);

    final GenericWebApplicationContext context = new GenericWebApplicationContext(beanFactory);
    context.setParent(parent);
    context.setServletContext(wrappedServletContext);
    context.setClassLoader(classLoader);

    return context;
  }
View Full Code Here

* @author Phil Zoio
*/
public class WebPlaceholderDelegatingContextLoader implements DelegatingContextLoader {

  public ConfigurableApplicationContext loadApplicationContext(ApplicationContext parent, ModuleDefinition definition) {
    GenericWebApplicationContext context = new GenericWebApplicationContext();
    context.refresh();
    return context;
  }
View Full Code Here

    }
   
    final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
    beanFactory.setBeanClassLoader(classLoader);

    final GenericWebApplicationContext context = new GenericWebApplicationContext(beanFactory);
    context.setParent(parent);
    context.setServletContext(wrappedServletContext);
    context.setClassLoader(classLoader);
    context.setDisplayName(ModuleLoaderUtils.getDisplayName(moduleDefinition, context));

    return context;
  }
View Full Code Here

* @author Phil Zoio
*/
public class WebPlaceholderDelegatingContextLoader implements DelegatingContextLoader {

  public ConfigurableApplicationContext loadApplicationContext(ApplicationContext parent, ModuleDefinition definition) {
    GenericWebApplicationContext context = new GenericWebApplicationContext();
    context.refresh();
    return context;
  }
View Full Code Here

  protected ModuleManagementFacade createModuleManagementFacade(ServletContext servletContext) {
    String[] locations = getBootstrapContextLocations(servletContext);
    logger.info("Loading bootstrap context from locations " + Arrays.toString(locations));

    final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
    final GenericWebApplicationContext applicationContext = new GenericWebApplicationContext(beanFactory);
    applicationContext.setServletContext(servletContext);

    XmlBeanDefinitionReader definitionReader = new XmlBeanDefinitionReader(beanFactory);
    for (int i = 0; i < locations.length; i++) {
      definitionReader.loadBeanDefinitions(new ClassPathResource(locations[i]));
    }
    applicationContext.refresh();

    return ObjectUtils.cast(applicationContext.getBean("moduleManagementFacade"), ModuleManagementFacade.class);
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.context.support.GenericWebApplicationContext

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.