Author: galder.zamarreno(a)jboss.com
Date: 2009-12-03 04:03:35 -0500 (Thu, 03 Dec 2009)
New Revision: 18119
Modified:
core/trunk/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java
Log:
[HHH-4575] (When Infinispan is configured for INVALIDATION don't send cluster message
on entity insert) Fixed.
Modified:
core/trunk/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java
===================================================================
---
core/trunk/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java 2009-12-03
09:03:31 UTC (rev 18118)
+++
core/trunk/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java 2009-12-03
09:03:35 UTC (rev 18119)
@@ -32,6 +32,7 @@
import org.hibernate.cache.infinispan.impl.BaseRegion;
import org.hibernate.cache.infinispan.util.CacheAdapter;
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.LogFactory;
@@ -109,7 +110,12 @@
public boolean insert(Object key, Object value, Object version) throws CacheException
{
if (!region.checkValid())
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;
}
Show replies by date