Package org.springframework.context

Examples of org.springframework.context.LifecycleProcessor


    BeanDefinition beanDefinition = new RootBeanDefinition(DefaultLifecycleProcessor.class);
    beanDefinition.getPropertyValues().addPropertyValue("timeoutPerShutdownPhase", 1000);
    StaticApplicationContext context = new StaticApplicationContext();
    context.registerBeanDefinition("lifecycleProcessor", beanDefinition);
    context.refresh();
    LifecycleProcessor bean = context.getBean("lifecycleProcessor", LifecycleProcessor.class);
    Object contextLifecycleProcessor = new DirectFieldAccessor(context).getPropertyValue("lifecycleProcessor");
    assertNotNull(contextLifecycleProcessor);
    assertSame(bean, contextLifecycleProcessor);
    assertEquals(1000L, new DirectFieldAccessor(contextLifecycleProcessor).getPropertyValue(
        "timeoutPerShutdownPhase"));
View Full Code Here

TOP

Related Classes of org.springframework.context.LifecycleProcessor

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.