Package com.alibaba.citrus.springext.support.context

Examples of com.alibaba.citrus.springext.support.context.XmlWebApplicationContext


    protected static void initFactory(String configFile) throws Exception {
        initServlet();

        System.setProperty("project.home", new File("").getAbsolutePath());
        System.setProperty("srcdir", srcdir.getAbsolutePath());
        XmlWebApplicationContext webCtx = new XmlWebApplicationContext();

        webCtx.setResourceLoadingExtender(new ResourceLoadingSupport(webCtx));
        webCtx.setConfigLocation(new File(srcdir, configFile).toURI().toString());
        webCtx.setServletContext(servletContext);
        webCtx.refresh();

        parentFactory = webCtx;
        factory = webCtx;
    }
View Full Code Here


    public static void initGlobal() throws Exception {
        // parent context
        createBeanFactory("services.xml");

        // sub context - web context������ͼ����ע��request�ȶ��󣬵�������parent���Ѿ����ڣ�������
        subFactory = new XmlWebApplicationContext();
        subFactory.setConfigLocation("empty.xml");
        subFactory.setServletContext(new ServletRunner(new File(srcdir, "WEB-INF/web.xml"), "").newClient()
                .newInvocation("http://localhost/servlet").getServlet().getServletConfig().getServletContext());
        subFactory.setParent((ApplicationContext) factory);
        subFactory.refresh();
View Full Code Here

    protected void initFactory() {
        initFactory("services.xml");
    }

    protected void initFactory(String configFile) {
        factory = new XmlWebApplicationContext();

        factory.setConfigLocation(configFile);
        factory.setServletContext(servletContext);
        factory.setResourceLoadingExtender(new ResourceLoadingSupport(factory));
        factory.refresh();
View Full Code Here

        initServlet();
    }

    @Before
    public void init() {
        context = new XmlWebApplicationContext();
        support = new ResourceLoadingSupport(context);

        context.setResourceLoadingExtender(support);
        context.setServletContext(servletContext);
View Full Code Here

    protected static void initFactory(String configFile) throws Exception {
        initServlet();

        System.setProperty("project.home", new File("").getAbsolutePath());
        System.setProperty("srcdir", srcdir.getAbsolutePath());
        XmlWebApplicationContext webCtx = new XmlWebApplicationContext();

        webCtx.setResourceLoadingExtender(new ResourceLoadingSupport(webCtx));
        webCtx.setConfigLocation(new File(srcdir, configFile).toURI().toString());
        webCtx.setServletContext(servletContext);
        webCtx.refresh();

        parentFactory = webCtx;
        factory = webCtx;
    }
View Full Code Here

        initServlet();
    }

    @Before
    public void init() {
        context = new XmlWebApplicationContext();
        support = new ResourceLoadingSupport(context);

        context.setResourceLoadingExtender(support);
        context.setServletContext(servletContext);
View Full Code Here

    public static void initGlobal() throws Exception {
        // parent context
        createBeanFactory("services.xml");

        // sub context - web context将会试图重新注册request等对象,但是由于parent中已经存在,被忽略
        subFactory = new XmlWebApplicationContext();
        subFactory.setConfigLocation("empty.xml");
        subFactory.setServletContext(new ServletRunner(new File(srcdir, "WEB-INF/web.xml"), "").newClient()
                                                                                               .newInvocation("http://localhost/servlet").getServlet().getServletConfig().getServletContext());
        subFactory.setParent((ApplicationContext) factory);
        subFactory.refresh();
View Full Code Here

    protected void initFactory() {
        initFactory("services.xml");
    }

    protected void initFactory(String configFile) {
        factory = new XmlWebApplicationContext();

        factory.setConfigLocation(configFile);
        factory.setServletContext(servletContext);
        factory.setResourceLoadingExtender(new ResourceLoadingSupport(factory));
        factory.refresh();
View Full Code Here

    protected static void initFactory(String configFile) throws Exception {
        initServlet();

        System.setProperty("project.home", new File("").getAbsolutePath());
        System.setProperty("srcdir", srcdir.getAbsolutePath());
        XmlWebApplicationContext webCtx = new XmlWebApplicationContext();

        webCtx.setResourceLoadingExtender(new ResourceLoadingSupport(webCtx));
        webCtx.setConfigLocation(new File(srcdir, configFile).toURI().toString());
        webCtx.setServletContext(servletContext);
        webCtx.refresh();

        parentFactory = webCtx;
        factory = webCtx;
    }
View Full Code Here

    protected void initFactory() {
        initFactory("services.xml");
    }

    protected void initFactory(String configFile) {
        factory = new XmlWebApplicationContext();

        factory.setConfigLocation(configFile);
        factory.setServletContext(servletContext);
        factory.setResourceLoadingExtender(new ResourceLoadingSupport(factory));
        factory.refresh();
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.springext.support.context.XmlWebApplicationContext

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.