use of org.hibernate.cache.infinispan.util.CacheCommandFactory in project hibernate-orm by hibernate.
the class InfinispanRegionFactory method getCacheCommandFactory.
private CacheCommandFactory getCacheCommandFactory() {
final GlobalComponentRegistry globalCr = manager.getGlobalComponentRegistry();
final Map<Byte, ModuleCommandFactory> factories = (Map<Byte, ModuleCommandFactory>) globalCr.getComponent("org.infinispan.modules.command.factories");
for (ModuleCommandFactory factory : factories.values()) {
if (factory instanceof CacheCommandFactory) {
return (CacheCommandFactory) factory;
}
}
throw log.cannotInstallCommandFactory();
}
Aggregations