Search in sources :

Example 1 with MicroserviceVersionFactory

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);
}
Also used : AppManager(org.apache.servicecomb.serviceregistry.consumer.AppManager) MicroserviceVersionFactory(org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionFactory)

Aggregations

AppManager (org.apache.servicecomb.serviceregistry.consumer.AppManager)1 MicroserviceVersionFactory (org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionFactory)1