Examples of GrailsWebApplicationContext


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

Examples of org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext

public class IntrospectionJavaTests {

  @Test
  public void testSomething() {
    Object ctx = new GrailsWebApplicationContext();
    BeanWrapperImpl wrapper = new BeanWrapperImpl(ctx);
    assert wrapper.isReadableProperty("autowireCapableBeanFactory");
  }
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.