use of com.evolveum.midpoint.repo.cache.RepositoryCache in project midpoint by Evolveum.
the class RepositoryFactory method getCacheRepositoryService.
public synchronized RepositoryService getCacheRepositoryService() {
if (cacheRepositoryService == null) {
try {
Class<RepositoryServiceFactory> clazz = (Class<RepositoryServiceFactory>) Class.forName(REPOSITORY_FACTORY_CACHE_CLASS);
cacheFactory = getFactoryBean(clazz);
//TODO decompose this dependency, remove class casting !!!
RepositoryCache repositoryCache = (RepositoryCache) cacheFactory.getRepositoryService();
repositoryCache.setRepository(getRepositoryService(), prismContext);
cacheRepositoryService = repositoryCache;
} catch (Exception ex) {
LoggingUtils.logException(LOGGER, "Failed to get cache repository service. ExceptionClass = {}", ex, ex.getClass().getName());
throw new SystemException("Failed to get cache repository service", ex);
}
}
return cacheRepositoryService;
}
Aggregations