Package grails.web.servlet.context

Examples of grails.web.servlet.context.GrailsWebApplicationContext


    protected GenericApplicationContext createApplicationContext(ApplicationContext parentCtx) {
        if (parentCtx != null && beanFactory != null) {
            Assert.isInstanceOf(DefaultListableBeanFactory.class, beanFactory,
                "ListableBeanFactory set must be a subclass of DefaultListableBeanFactory");

            GrailsWebApplicationContext ctx = new GrailsWebApplicationContext((DefaultListableBeanFactory) beanFactory, grailsApplication);
            ctx.setParent(parentCtx);
            return ctx;
        }

        if (beanFactory != null) {
            Assert.isInstanceOf(DefaultListableBeanFactory.class, beanFactory,
                "ListableBeanFactory set must be a subclass of DefaultListableBeanFactory");

            return new GrailsWebApplicationContext((DefaultListableBeanFactory) beanFactory, grailsApplication);
        }

        if (parentCtx != null) {
            GrailsWebApplicationContext ctx = new GrailsWebApplicationContext(grailsApplication);
            ctx.setParent(parentCtx);
            return ctx;
        }

        return new GrailsWebApplicationContext();
    }
View Full Code Here

TOP

Related Classes of grails.web.servlet.context.GrailsWebApplicationContext

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.