use of com.cloud.utils.component.ComponentLifecycle in project cloudstack by apache.
the class NetworkProviderTest 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_mysqlSrverPort + ">");
TestDbSetup.destroy(s_mysqlSrverPort, null);
}
use of com.cloud.utils.component.ComponentLifecycle in project cloudstack by apache.
the class CloudStackExtendedLifeCycle method sortBeans.
private void sortBeans() {
for (ComponentLifecycle lifecycle : getBeans(ComponentLifecycle.class)) {
Set<ComponentLifecycle> set = sorted.get(lifecycle.getRunLevel());
if (set == null) {
set = new HashSet<ComponentLifecycle>();
sorted.put(lifecycle.getRunLevel(), set);
}
set.add(lifecycle);
}
}
use of com.cloud.utils.component.ComponentLifecycle 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);
}
Aggregations