use of org.apache.ignite.lifecycle.LifecycleBean in project ignite by apache.
the class SpringTransactionManagerContextInjectionTest method testBeanInjectionUsingConfigPath.
/**
* @throws Exception If failed.
*/
public void testBeanInjectionUsingConfigPath() throws Exception {
BeanFactory factory = new AnnotationConfigApplicationContext(TestPathConfiguration.class);
Ignite grid = IgnitionEx.grid("springInjectionTest");
IgniteConfiguration cfg = grid.configuration();
LifecycleBean[] beans = cfg.getLifecycleBeans();
assertEquals(2, beans.length);
TestInjectionLifecycleBean bean1 = (TestInjectionLifecycleBean) beans[0];
TestInjectionLifecycleBean bean2 = (TestInjectionLifecycleBean) beans[1];
bean1.checkState();
bean2.checkState();
}
Aggregations