use of org.springframework.context.support.AbstractApplicationContext in project cloudstack by apache.
the class PublicNetworkTest method globalTearDown.
@AfterClass
public static void globalTearDown() throws Exception {
s_lockMaster.cleanupForServer(s_msId);
JmxUtil.unregisterMBean("Locks", "Locks");
s_lockMaster = null;
AbstractApplicationContext ctx = (AbstractApplicationContext) ComponentContext.getApplicationContext();
Map<String, ComponentLifecycle> lifecycleComponents = ctx.getBeansOfType(ComponentLifecycle.class);
for (ComponentLifecycle bean : lifecycleComponents.values()) {
bean.stop();
}
ctx.close();
s_logger.info("destroying mysql server instance running at port <" + s_mysqlServerPort + ">");
TestDbSetup.destroy(s_mysqlServerPort, null);
}
use of org.springframework.context.support.AbstractApplicationContext 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