use of org.teiid.cache.infinispan.InfinispanCacheFactory in project teiid by teiid.
the class EmbeddedConfiguration method getCacheFactory.
public CacheFactory getCacheFactory() {
if (this.cacheFactory == null) {
try {
cacheManager = new DefaultCacheManager(this.infinispanConfigFile, true);
for (String cacheName : cacheManager.getCacheNames()) {
if (getTransactionManager() != null) {
setCacheTransactionManger(cacheName);
}
cacheManager.startCache(cacheName);
}
this.cacheFactory = new InfinispanCacheFactory(cacheManager, this.getClass().getClassLoader());
} catch (IOException e) {
throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40100, e);
}
}
return this.cacheFactory;
}
Aggregations