use of com.ctrip.xpipe.lifecycle.SpringComponentLifecycleManager in project x-pipe by ctripcorp.
the class MetaServerPrepareResourcesAndStart method setupResouces.
private ApplicationContext setupResouces(DcMeta dcMeta) throws Exception {
ApplicationContext applicationContext = SpringComponentLifecycleManager.getApplicationContext();
logger.info("[setupResouces][set zkConnectionString]");
ZkClient zkClient = applicationContext.getBean(ZkClient.class);
zkClient.setZkAddress(zkAddress);
logger.info("[setupResouces][start MetaServerLifecycleManager]");
SpringComponentLifecycleManager metaServerLifecycleManager = applicationContext.getBean(SpringComponentLifecycleManager.class);
metaServerLifecycleManager.startAll();
return applicationContext;
}
Aggregations