Package org.springside.modules.utils.spring

Examples of org.springside.modules.utils.spring.SpringContextHolder


    ConfigurableApplicationContext context = new ClassPathXmlApplicationContext(
        "classpath:/applicationContext-core-test.xml");
    assertNotNull(SpringContextHolder.getApplicationContext());

    SpringContextHolder holderByName = SpringContextHolder.getBean("springContextHolder");
    assertEquals(SpringContextHolder.class, holderByName.getClass());

    SpringContextHolder holderByClass = SpringContextHolder.getBean(SpringContextHolder.class);
    assertEquals(SpringContextHolder.class, holderByClass.getClass());

    context.close();
    assertNull(ReflectionUtils.getFieldValue(holderByName, "applicationContext"));

  }
View Full Code Here

TOP

Related Classes of org.springside.modules.utils.spring.SpringContextHolder

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.