use of org.apache.ignite.TestInjectionLifecycleBean in project ignite by apache.
the class SpringCacheManagerContextInjectionTest method testBeanInjectionUsingConfigPath.
/**
* @throws Exception If failed.
*/
public void testBeanInjectionUsingConfigPath() throws Exception {
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();
}
use of org.apache.ignite.TestInjectionLifecycleBean in project ignite by apache.
the class SpringCacheManagerContextInjectionTest method testBeanInjectionUsingConfiguration.
/**
* @throws Exception If failed.
*/
public void testBeanInjectionUsingConfiguration() throws Exception {
BeanFactory factory = new AnnotationConfigApplicationContext(TestCfgConfiguration.class);
TestInjectionLifecycleBean bean1 = (TestInjectionLifecycleBean) factory.getBean("bean1");
TestInjectionLifecycleBean bean2 = (TestInjectionLifecycleBean) factory.getBean("bean2");
bean1.checkState();
bean2.checkState();
}
use of org.apache.ignite.TestInjectionLifecycleBean in project ignite by apache.
the class SpringTransactionManagerContextInjectionTest method testBeanInjectionUsingConfig.
/**
* @throws Exception If failed.
*/
public void testBeanInjectionUsingConfig() throws Exception {
BeanFactory factory = new AnnotationConfigApplicationContext(TestCfgConfiguration.class);
TestInjectionLifecycleBean bean1 = (TestInjectionLifecycleBean) factory.getBean("bean1");
TestInjectionLifecycleBean bean2 = (TestInjectionLifecycleBean) factory.getBean("bean2");
bean1.checkState();
bean2.checkState();
}
use of org.apache.ignite.TestInjectionLifecycleBean 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