Package org.springframework.web.context.support

Examples of org.springframework.web.context.support.GenericWebApplicationContext.refresh()


        context.setServletContext(new AttributeServletContext());
       
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
        reader.loadBeanDefinitions(new ClassPathResource("org/impalaframework/web/spring/config/jspservletbeancontext.xml"));
       
        context.refresh();
       
        final Object factoryBean = context.getBean("&jspServlet");
        assertTrue(factoryBean instanceof JspServletFactoryBean);
       
        final Object bean = context.getBean("jspServlet");
View Full Code Here


        context.setServletContext(new AttributeServletContext());
       
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
        reader.loadBeanDefinitions(new ClassPathResource("org/impalaframework/web/spring/config/listenerbeancontext.xml"));
       
        context.refresh();
       
        TestContextListener listener = (TestContextListener) context.getBean("listener");
        assertTrue(listener.isInitialized());
        assertFalse(listener.isDestroyed());
       
View Full Code Here

        context.setServletContext(new AttributeServletContext());
       
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
        reader.loadBeanDefinitions(new ClassPathResource("org/impalaframework/web/spring/config/filterbeancontext.xml"));
       
        context.refresh();
       
        assertEquals("initValue", MyFilter2.getConfigParam());
       
        Map<String, FilterFactoryBean> factoryBeans = context.getBeansOfType(FilterFactoryBean.class);
        assertEquals(3, factoryBeans.size());
View Full Code Here


    private GenericWebApplicationContext newContext(boolean refresh) {
        final GenericWebApplicationContext value = new GenericWebApplicationContext();
        if (refresh) {
          value.refresh();
        }
        return value;
    }
      
    public void testInitImpalaContext() throws Exception {
View Full Code Here

        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);
    }

    public abstract ModuleDefinitionSource getModuleDefinitionSource(ServletContext servletContext, ModuleManagementFacade factory);
View Full Code Here

        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);
    }

    public abstract ModuleDefinitionSource getModuleDefinitionSource(ServletContext servletContext, ModuleManagementFacade factory);
View Full Code Here

    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);
  }

  public String[] getBootstrapContextLocations(ServletContext servletContext) {
View Full Code Here

*/
public class WebPlaceholderDelegatingContextLoader implements DelegatingContextLoader {

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

}
View Full Code Here

*/
public class WebPlaceholderDelegatingContextLoader implements DelegatingContextLoader {

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

}
View Full Code Here

*/
public class WebPlaceholderDelegatingContextLoader implements DelegatingContextLoader {

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

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.