[HHH-4575] (When Infinispan is configured for INVALIDATION don't send cluster message on entity insert) Fixed.
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18119 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
6f978e52bb
commit
df2f9a8270
|
@ -32,6 +32,7 @@ import org.hibernate.cache.access.SoftLock;
|
||||||
import org.hibernate.cache.infinispan.impl.BaseRegion;
|
import org.hibernate.cache.infinispan.impl.BaseRegion;
|
||||||
import org.hibernate.cache.infinispan.util.CacheAdapter;
|
import org.hibernate.cache.infinispan.util.CacheAdapter;
|
||||||
import org.hibernate.cache.infinispan.util.CacheHelper;
|
import org.hibernate.cache.infinispan.util.CacheHelper;
|
||||||
|
import org.hibernate.cache.infinispan.util.FlagAdapter;
|
||||||
import org.infinispan.util.logging.Log;
|
import org.infinispan.util.logging.Log;
|
||||||
import org.infinispan.util.logging.LogFactory;
|
import org.infinispan.util.logging.LogFactory;
|
||||||
|
|
||||||
|
@ -109,7 +110,12 @@ public class TransactionalAccessDelegate {
|
||||||
public boolean insert(Object key, Object value, Object version) throws CacheException {
|
public boolean insert(Object key, Object value, Object version) throws CacheException {
|
||||||
if (!region.checkValid())
|
if (!region.checkValid())
|
||||||
return false;
|
return false;
|
||||||
cacheAdapter.put(key, value);
|
|
||||||
|
if (cacheAdapter.isClusteredInvalidation())
|
||||||
|
cacheAdapter.withFlags(FlagAdapter.CACHE_MODE_LOCAL).put(key, value);
|
||||||
|
else
|
||||||
|
cacheAdapter.put(key, value);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue