Package org.springframework.web.context

Examples of org.springframework.web.context.ConfigurableWebApplicationContext.refresh()


    }

    applicationContext.setId("Geomajas:" + id);
    applicationContext.setServletContext(servletContext);
    applicationContext.setConfigLocation(configLocation.toString());
    applicationContext.refresh();

    ApplicationContextUtil.setApplicationContext(servletContext, applicationContext);
    servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationContext);
  }
View Full Code Here


        ConfigurableWebApplicationContext ac = new XmlWebApplicationContext();
        ServletContext msc = (ServletContext) new MockServletContext();
        msc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ac);
        ac.setServletContext(msc);
        ac.setConfigLocations(new String[] {"org/apache/struts2/spring/StrutsSpringObjectFactoryTest-applicationContext.xml"});
        ac.refresh();
        StrutsSpringObjectFactory fac = new StrutsSpringObjectFactory("constructor", null, null, msc, null, container);

        assertEquals(AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, fac.getAutowireStrategy());
    }
View Full Code Here

    wac.setParent(parent);
    wac.setServletContext(filter.getFilterConfig().getServletContext());
    wac.setConfigLocation(getContextConfigLocation(filter));

    postProcessWebApplicationContext(wac, filter);
    wac.refresh();

    return wac;
  }

  /**
 
View Full Code Here

    wac.setNamespace(getNamespace());
    wac.setConfigLocation(getContextConfigLocation());
    wac.addApplicationListener(new SourceFilteringListener(wac, this));

    postProcessWebApplicationContext(wac);
    wac.refresh();

    return wac;
  }

  /**
 
View Full Code Here

        ConfigurableWebApplicationContext ac = new XmlWebApplicationContext();
        ServletContext msc = (ServletContext) new MockServletContext();
        msc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ac);
        ac.setServletContext(msc);
        ac.setConfigLocations(new String[] {"org/apache/struts2/spring/StrutsSpringObjectFactoryTest-applicationContext.xml"});
        ac.refresh();
        StrutsSpringObjectFactory fac = new StrutsSpringObjectFactory("constructor", null, msc);

        assertEquals(AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, fac.getAutowireStrategy());
    }
View Full Code Here

        ConfigurableWebApplicationContext ac = new XmlWebApplicationContext();
        ServletContext msc = (ServletContext) new MockServletContext();
        msc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ac);
        ac.setServletContext(msc);
        ac.setConfigLocations(new String[] {"org/apache/struts2/spring/StrutsSpringObjectFactoryTest-applicationContext.xml"});
        ac.refresh();

        fac.init(msc);

        assertEquals(AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, fac.getAutowireStrategy());
    }
View Full Code Here

            beanFactory.ignoreDependencyType(ActionServlet.class);
          }
        }
    );

    wac.refresh();
    return wac;
  }

  /**
   * Return the ServletContext attribute name for this PlugIn's WebApplicationContext.
View Full Code Here

            beanFactory.ignoreDependencyType(ActionServlet.class);
          }
        }
    );

    wac.refresh();
    return wac;
  }

  /**
   * Return the ServletContext attribute name for this PlugIn's WebApplicationContext.
View Full Code Here

              getContextConfigLocation(), ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS));
    }
    wac.addApplicationListener(new SourceFilteringListener(wac, this));

    postProcessWebApplicationContext(wac);
    wac.refresh();

    return wac;
  }

  /**
 
View Full Code Here

        ConfigurableWebApplicationContext ac = new XmlWebApplicationContext();
        ServletContext msc = (ServletContext) new MockServletContext();
        msc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ac);
        ac.setServletContext(msc);
        ac.setConfigLocations(new String[] {"org/apache/struts2/spring/StrutsSpringObjectFactoryTest-applicationContext.xml"});
        ac.refresh();
        StrutsSpringObjectFactory fac = new StrutsSpringObjectFactory("constructor", null, msc);

        assertEquals(AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, fac.getAutowireStrategy());
    }
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.