use of org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionFactory in project incubator-servicecomb-java-chassis by apache.
the class AbstractServiceRegistry method initAppManager.
protected void initAppManager() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
appManager = new AppManager(eventBus);
// we did not remove old InstanceCacheManager now
// microserviceVersionFactoryClass is null, means use old InstanceCacheManager
// must not throw exception
String microserviceVersionFactoryClass = serviceRegistryConfig.getMicroserviceVersionFactory();
if (microserviceVersionFactoryClass == null) {
return;
}
MicroserviceVersionFactory microserviceVersionFactory = (MicroserviceVersionFactory) Class.forName(microserviceVersionFactoryClass).newInstance();
appManager.setMicroserviceVersionFactory(microserviceVersionFactory);
LOGGER.info("microserviceVersionFactory is {}.", microserviceVersionFactoryClass);
}
Aggregations