this.indexName = indexName;
tm = cache.getAdvancedCache().getTransactionManager();
if (tm == null) {
ComponentStatus status = cache.getAdvancedCache().getComponentRegistry().getStatus();
if (status.equals(ComponentStatus.RUNNING)) {
throw new CacheException(
"Failed looking up TransactionManager. Check if any transaction manager is associated with Infinispan cache: \'"
+ cache.getName() + "\'");
}
else {
throw new CacheException("Failed looking up TransactionManager: the cache is not running");
}
}
defLock = new TransactionalSharedLuceneLock(cache, indexName, DEF_LOCK_NAME, tm);
}