use of org.springframework.context.support.FileSystemXmlApplicationContext in project ignite by apache.
the class GridServiceInjectionSpringResourceTest method startNodes.
/**
*
* @throws Exception If failed.
*/
private void startNodes() throws Exception {
AbstractApplicationContext ctxSpring = new FileSystemXmlApplicationContext(springCfgFileOutTmplName + 0);
// We have to deploy Services for service is available at the bean creation time for other nodes.
Ignite ignite = (Ignite) ctxSpring.getBean("testIgnite");
ignite.services().deployMultiple(SERVICE_NAME, new DummyServiceImpl(), NODES, 1);
// Add other nodes.
for (int i = 1; i < NODES; ++i) new FileSystemXmlApplicationContext(springCfgFileOutTmplName + i);
assertEquals(NODES, G.allGrids().size());
assertEquals(NODES, ignite.cluster().nodes().size());
}
Aggregations