Package org.springframework.web.context.support

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


  public void testMixedGet() throws Exception {
    MockServletContext sc = new MockServletContext("");
    XmlWebApplicationContext wac = new XmlWebApplicationContext();
    wac.setServletContext(sc);
    wac.setConfigLocations(new String[]{"/net/buffalo/service/spring/applicationContext.xml"});
    wac.refresh();
    String key = WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE;
    sc.setAttribute(key, wac);
   
    dsr = new DefaultServiceRepository(sc, serivceProp);
   
View Full Code Here


    // Note: default context location is /WEB-INF/applicationContext.xml
    LOGGER.info("Making an XmlWebApplicationContext");
    XmlWebApplicationContext ac = new XmlWebApplicationContext();
    ac.setServletContext(servletContext);
    ac.refresh();

    Context context = Context.getInstance();
    context.setServletContext(ac, servletContext.getRealPath("/WEB-INF"));
    context.start();
    LOGGER.info("Connector Manager started.");
View Full Code Here

         * crowdConfigContext .setConfigLocations(new String[] {
         * "classpath:/applicationContext-HudsonCrowdClient.xml" });
         */
        crowdConfigContext
                .setConfigLocations(new String[] { "classpath:/applicationContext-CrowdClient.xml" });
        crowdConfigContext.refresh();

        // load the Hudson-Crowd configuration from Crowd.groovy
        BeanBuilder builder = new BeanBuilder(crowdConfigContext, getClass().getClassLoader());
        Binding binding = new Binding();
        builder.parse(getClass().getResourceAsStream("Crowd.groovy"), binding);
View Full Code Here

                return new String[]{
                    "classpath*:applicationContext-hibtest.xml",
                    "classpath*:applicationContext-hib2.xml"};
            }
        };
        ctx.refresh();
        HibernateMonitorDAO2 hibdao = (HibernateMonitorDAO2) ctx.getBean("hibMonitorDAO");
        hibdao.setSync(Sync.SYNC);
        hibdao.setMode(Mode.HYBRID);
        dao = hibdao;
       
View Full Code Here

    WicketTester tester = new WicketTester(app);
    ServletContext sc = app.getServletContext();
        XmlWebApplicationContext xmlContext = new XmlWebApplicationContext();
        xmlContext.setConfigLocation("classpath:openmeetings-applicationContext.xml");
        xmlContext.setServletContext(sc);
        xmlContext.refresh();
        sc.setAttribute(ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, xmlContext);
        if (langId > 0) {
          WebSession.get().setLanguage(langId);
        }
        InitializationContainer.initComplete = true;
View Full Code Here

        } else {
            ctx2.setConfigLocations(new String[] {"classpath:/META-INF/cxf/cxf.xml",
                                                  location});
            createdContext = ctx2;
        }
        ctx2.refresh();
        return ctx2;
    }
    public void destroyBus() {
        if (busCreated) {
            //if we created the Bus, we need to destroy it.  Otherwise, spring will handleit.
View Full Code Here

            XmlWebApplicationContext context = new XmlWebApplicationContext();
            context.setParent(applicationContext);
            context.setConfigLocation(config.getInitParameter(CONTEXT_CONFIG_LOCATION_PARAMETER));
            context.setServletConfig(config);
            context.setServletContext(config.getServletContext());
            context.refresh();

            applicationContext = context;
        }

        if (config.getInitParameter(SYSTEM_MESSAGES_BEAN_NAME_PARAMETER) != null)
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.