diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java index 99adda22b8..8ff2246945 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java @@ -156,6 +156,10 @@ public class PutFromLoadValidator { else { throw log.pendingPutsMustHaveMaxIdle(); } + + this.cache = cache; + this.pendingPuts = cacheManager.getCache(pendingPutsName); + CacheMode cacheMode = cache.getCacheConfiguration().clustering().cacheMode(); // Since we need to intercept both invalidations of entries that are in the cache and those // that are not, we need to use custom interceptor, not listeners (which fire only for present entries). @@ -166,9 +170,6 @@ public class PutFromLoadValidator { } addToCache(cache, this); } - - this.cache = cache; - this.pendingPuts = cacheManager.getCache(pendingPutsName); } /**