HHH-9632 Update to Infinispan 7.1.0.Final
This commit is contained in:
parent
9337f73185
commit
260ff03ae5
|
@ -1,134 +1,80 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="urn:infinispan:config:6.0"
|
xmlns="urn:infinispan:config:7.0"
|
||||||
xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd">
|
xsi:schemaLocation="urn:infinispan:config:7.0 http://www.infinispan.org/schemas/infinispan-config-7.0.xsd">
|
||||||
<global>
|
|
||||||
<transport
|
|
||||||
transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"
|
|
||||||
clusterName="infinispan-hibernate-cluster"
|
|
||||||
distributedSyncTimeout="50000"
|
|
||||||
strictPeerToPeer="false">
|
|
||||||
<!-- Note that the JGroups transport uses sensible defaults if no configuration property is defined. -->
|
|
||||||
<properties>
|
|
||||||
<!--<property name="configurationFile" value="jgroups-tcp.xml"/>-->
|
|
||||||
<property name="configurationFile"
|
|
||||||
value="${hibernate.cache.infinispan.jgroups_cfg:jgroups-tcp.xml}"/>
|
|
||||||
</properties>
|
|
||||||
<!-- See the JGroupsTransport javadocs for more flags -->
|
|
||||||
</transport>
|
|
||||||
</global>
|
|
||||||
|
|
||||||
<default>
|
<jgroups>
|
||||||
<!-- Used to register JMX statistics in any available MBean server -->
|
<stack-file name="hibernate-jgroups" path="${hibernate.cache.infinispan.jgroups_cfg:jgroups-tcp.xml}"/>
|
||||||
<jmxStatistics enabled="false"/>
|
</jgroups>
|
||||||
</default>
|
|
||||||
|
<cache-container name="SampleCacheManager" statistics="false" default-cache="the-default-cache" shutdown-hook="DEFAULT">
|
||||||
|
<transport stack="hibernate-jgroups" cluster="infinispan-hibernate-cluster"/>
|
||||||
|
|
||||||
|
<local-cache name="the-default-cache" statistics="false" />
|
||||||
|
|
||||||
<!-- Default configuration is appropriate for entity/collection caching. -->
|
<!-- Default configuration is appropriate for entity/collection caching. -->
|
||||||
<namedCache name="entity">
|
<invalidation-cache name="entity" mode="SYNC" remote-timeout="20000">
|
||||||
<clustering mode="invalidation">
|
<locking isolation="READ_COMMITTED" concurrency-level="1000" acquire-timeout="15000" striping="false"/>
|
||||||
<stateTransfer fetchInMemoryState="false" timeout="20000"/>
|
<transaction mode="NON_XA" locking="OPTIMISTIC" auto-commit="false"/>
|
||||||
<sync replTimeout="20000"/>
|
<eviction max-entries="10000" strategy="LRU"/>
|
||||||
</clustering>
|
<expiration max-idle="100000" interval="5000"/>
|
||||||
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
|
</invalidation-cache>
|
||||||
lockAcquisitionTimeout="15000" useLockStriping="false"/>
|
|
||||||
<!-- Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds.
|
|
||||||
0 means the eviction thread will never run. A separate executor is used for eviction in each cache. -->
|
|
||||||
<eviction maxEntries="10000" strategy="LRU"/>
|
|
||||||
<expiration maxIdle="100000" wakeUpInterval="5000"/>
|
|
||||||
<transaction transactionMode="TRANSACTIONAL" autoCommit="false"
|
|
||||||
lockingMode="OPTIMISTIC"/>
|
|
||||||
</namedCache>
|
|
||||||
|
|
||||||
<!-- Default configuration is appropriate for entity/collection caching. -->
|
<!-- Default configuration is appropriate for entity/collection caching. -->
|
||||||
<namedCache name="entity-repeatable">
|
<invalidation-cache name="entity-repeatable" mode="SYNC" remote-timeout="20000">
|
||||||
<clustering mode="invalidation">
|
<locking isolation="REPEATABLE_READ" concurrency-level="1000" acquire-timeout="15000" striping="false"/>
|
||||||
<stateTransfer fetchInMemoryState="false" timeout="20000"/>
|
<transaction mode="NON_XA" locking="OPTIMISTIC" auto-commit="false"/>
|
||||||
<sync replTimeout="20000"/>
|
<eviction max-entries="10000" strategy="LRU"/>
|
||||||
</clustering>
|
<expiration max-idle="100000" interval="5000"/>
|
||||||
<!-- Note: REPEATABLE_READ is only useful if the application evicts/clears entities
|
</invalidation-cache>
|
||||||
from the Hibernate Session and then expects to repeatably re-read them in
|
|
||||||
the same transaction. Otherwise, the Session's internal cache provides a
|
|
||||||
repeatable-read semantic. Before choosing this config, carefully read the docs
|
|
||||||
and make sure you really need REPEATABLE_READ.
|
|
||||||
-->
|
|
||||||
<locking isolationLevel="REPEATABLE_READ" concurrencyLevel="1000"
|
|
||||||
lockAcquisitionTimeout="15000" useLockStriping="false"/>
|
|
||||||
<!-- Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds.
|
|
||||||
0 means the eviction thread will never run. A separate executor is used for eviction in each cache. -->
|
|
||||||
<eviction maxEntries="10000" strategy="LRU"/>
|
|
||||||
<expiration maxIdle="100000" wakeUpInterval="5000"/>
|
|
||||||
<transaction transactionMode="TRANSACTIONAL" autoCommit="false"
|
|
||||||
lockingMode="OPTIMISTIC"/>
|
|
||||||
</namedCache>
|
|
||||||
|
|
||||||
<!-- An alternative configuration for entity/collection caching that uses replication instead of invalidation -->
|
<!-- An alternative configuration for entity/collection caching that uses replication instead of invalidation -->
|
||||||
<namedCache name="replicated-entity">
|
<replicated-cache name="replicated-entity" mode="SYNC" remote-timeout="20000">
|
||||||
<clustering mode="replication">
|
<locking isolation="READ_COMMITTED" concurrency-level="1000" acquire-timeout="15000" striping="false"/>
|
||||||
<stateTransfer fetchInMemoryState="false" timeout="20000"/>
|
<transaction mode="NON_XA" locking="OPTIMISTIC" auto-commit="false"/>
|
||||||
<sync replTimeout="20000"/>
|
<eviction max-entries="10000" strategy="LRU"/>
|
||||||
</clustering>
|
<expiration max-idle="100000" interval="5000"/>
|
||||||
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
|
<state-transfer enabled="false"/>
|
||||||
lockAcquisitionTimeout="15000" useLockStriping="false"/>
|
</replicated-cache>
|
||||||
<!-- Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds.
|
|
||||||
0 means the eviction thread will never run. A separate executor is used for eviction in each cache. -->
|
|
||||||
<eviction maxEntries="10000" strategy="LRU"/>
|
|
||||||
<expiration maxIdle="100000" wakeUpInterval="5000"/>
|
|
||||||
<lazyDeserialization enabled="true"/>
|
|
||||||
<transaction transactionMode="TRANSACTIONAL" autoCommit="false"
|
|
||||||
lockingMode="OPTIMISTIC"/>
|
|
||||||
</namedCache>
|
|
||||||
|
|
||||||
<!-- A config appropriate for query caching. Does not replicate queries. -->
|
<!-- A config appropriate for query caching. Does not replicate queries. -->
|
||||||
<namedCache name="local-query">
|
<local-cache name="local-query">
|
||||||
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
|
<locking isolation="READ_COMMITTED" concurrency-level="1000" acquire-timeout="15000" striping="false"/>
|
||||||
lockAcquisitionTimeout="15000" useLockStriping="false"/>
|
<transaction mode="NON_XA" locking="OPTIMISTIC" auto-commit="false"/>
|
||||||
<!--Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means
|
<eviction max-entries="10000" strategy="LRU"/>
|
||||||
the eviction thread will never run. A separate executor is used for eviction in each cache. -->
|
<expiration max-idle="100000" interval="5000"/>
|
||||||
<eviction maxEntries="10000" strategy="LRU"/>
|
</local-cache>
|
||||||
<expiration maxIdle="100000" wakeUpInterval="5000"/>
|
|
||||||
<transaction transactionMode="TRANSACTIONAL" autoCommit="false"
|
|
||||||
lockingMode="OPTIMISTIC"/>
|
|
||||||
</namedCache>
|
|
||||||
|
|
||||||
<!-- A query cache that replicates queries. Replication is asynchronous. -->
|
<!-- A query cache that replicates queries. Replication is asynchronous. -->
|
||||||
<namedCache name="replicated-query">
|
<replicated-cache name="replicated-query" mode="ASYNC">
|
||||||
<clustering mode="replication">
|
<locking isolation="READ_COMMITTED" concurrency-level="1000" acquire-timeout="15000" striping="false"/>
|
||||||
<async/>
|
<transaction mode="NON_XA" locking="OPTIMISTIC" auto-commit="false"/>
|
||||||
</clustering>
|
<eviction max-entries="10000" strategy="LRU"/>
|
||||||
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
|
<expiration max-idle="100000" interval="5000"/>
|
||||||
lockAcquisitionTimeout="15000" useLockStriping="false"/>
|
<persistence passivation="false">
|
||||||
<!--Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means
|
|
||||||
the eviction thread will never run. A separate executor is used for eviction in each cache. -->
|
|
||||||
<eviction maxEntries="10000" strategy="LRU"/>
|
|
||||||
<expiration maxIdle="100000" wakeUpInterval="5000"/>
|
|
||||||
<transaction transactionMode="TRANSACTIONAL" autoCommit="false"
|
|
||||||
lockingMode="OPTIMISTIC"/>
|
|
||||||
<!-- State transfer forces all replication calls to be synchronous,
|
<!-- State transfer forces all replication calls to be synchronous,
|
||||||
so for calls to remain async, use a cluster cache loader instead -->
|
so for calls to remain async, use a cluster cache loader instead -->
|
||||||
<persistence passivation="false">
|
<cluster-loader remote-timeout="20000"/>
|
||||||
<cluster remoteCallTimeout="20000" />
|
|
||||||
</persistence>
|
</persistence>
|
||||||
</namedCache>
|
</replicated-cache>
|
||||||
|
|
||||||
<!-- Optimized for timestamp caching. A clustered timestamp cache
|
<!-- Optimized for timestamp caching. A clustered timestamp cache
|
||||||
is required if query caching is used, even if the query cache
|
is required if query caching is used, even if the query cache
|
||||||
itself is configured with CacheMode=LOCAL. -->
|
itself is configured with CacheMode=LOCAL. -->
|
||||||
<namedCache name="timestamps">
|
<replicated-cache name="timestamps" mode="ASYNC">
|
||||||
<clustering mode="replication">
|
<locking isolation="READ_COMMITTED" concurrency-level="1000" acquire-timeout="15000" striping="false"/>
|
||||||
<async/>
|
<!-- Explicitly non transactional -->
|
||||||
</clustering>
|
<transaction mode="NONE"/>
|
||||||
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
|
|
||||||
lockAcquisitionTimeout="15000" useLockStriping="false"/>
|
|
||||||
<!-- Don't ever evict modification timestamps -->
|
<!-- Don't ever evict modification timestamps -->
|
||||||
<eviction strategy="NONE"/>
|
<eviction strategy="NONE"/>
|
||||||
<expiration wakeUpInterval="0"/>
|
<expiration interval="0"/>
|
||||||
<!-- Explicitly non transactional -->
|
<persistence passivation="false">
|
||||||
<transaction transactionMode="NON_TRANSACTIONAL"/>
|
|
||||||
<!-- State transfer forces all replication calls to be synchronous,
|
<!-- State transfer forces all replication calls to be synchronous,
|
||||||
so for calls to remain async, use a cluster cache loader instead -->
|
so for calls to remain async, use a cluster cache loader instead -->
|
||||||
<persistence passivation="false">
|
<cluster-loader remote-timeout="20000"/>
|
||||||
<cluster remoteCallTimeout="20000" />
|
|
||||||
</persistence>
|
</persistence>
|
||||||
</namedCache>
|
<state-transfer enabled="false"/>
|
||||||
|
</replicated-cache>
|
||||||
|
</cache-container>
|
||||||
|
|
||||||
</infinispan>
|
</infinispan>
|
|
@ -110,6 +110,7 @@ public abstract class AbstractGeneralDataRegionTestCase extends AbstractRegionIm
|
||||||
assertNull( "remote is clean", remoteRegion.get( KEY ) );
|
assertNull( "remote is clean", remoteRegion.get( KEY ) );
|
||||||
|
|
||||||
regionPut(localRegion);
|
regionPut(localRegion);
|
||||||
|
sleep( 250 );
|
||||||
assertEquals( VALUE1, localRegion.get( KEY ) );
|
assertEquals( VALUE1, localRegion.get( KEY ) );
|
||||||
|
|
||||||
// allow async propagation
|
// allow async propagation
|
||||||
|
|
|
@ -29,9 +29,11 @@ import org.infinispan.AdvancedCache;
|
||||||
import org.infinispan.configuration.cache.CacheMode;
|
import org.infinispan.configuration.cache.CacheMode;
|
||||||
import org.infinispan.configuration.cache.Configuration;
|
import org.infinispan.configuration.cache.Configuration;
|
||||||
import org.infinispan.configuration.cache.ConfigurationBuilder;
|
import org.infinispan.configuration.cache.ConfigurationBuilder;
|
||||||
|
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
|
||||||
import org.infinispan.eviction.EvictionStrategy;
|
import org.infinispan.eviction.EvictionStrategy;
|
||||||
import org.infinispan.manager.DefaultCacheManager;
|
import org.infinispan.manager.DefaultCacheManager;
|
||||||
import org.infinispan.manager.EmbeddedCacheManager;
|
import org.infinispan.manager.EmbeddedCacheManager;
|
||||||
|
import org.infinispan.test.TestingUtil;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.hibernate.cache.CacheException;
|
import org.hibernate.cache.CacheException;
|
||||||
|
@ -290,18 +292,19 @@ public class InfinispanRegionFactoryTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(expected = CacheException.class)
|
||||||
public void testTimestampValidation() {
|
public void testTimestampValidation() {
|
||||||
Properties p = new Properties();
|
Properties p = new Properties();
|
||||||
final DefaultCacheManager manager = new DefaultCacheManager();
|
final DefaultCacheManager manager = new DefaultCacheManager(GlobalConfigurationBuilder.defaultClusteredBuilder().build());
|
||||||
|
try {
|
||||||
InfinispanRegionFactory factory = createRegionFactory(manager, p);
|
InfinispanRegionFactory factory = createRegionFactory(manager, p);
|
||||||
ConfigurationBuilder builder = new ConfigurationBuilder();
|
ConfigurationBuilder builder = new ConfigurationBuilder();
|
||||||
builder.clustering().cacheMode(CacheMode.INVALIDATION_SYNC);
|
builder.clustering().cacheMode(CacheMode.INVALIDATION_SYNC);
|
||||||
manager.defineConfiguration("timestamps", builder.build());
|
manager.defineConfiguration("timestamps", builder.build());
|
||||||
try {
|
|
||||||
factory.start(null, p);
|
factory.start(null, p);
|
||||||
fail("Should have failed saying that invalidation is not allowed for timestamp caches.");
|
fail("Should have failed saying that invalidation is not allowed for timestamp caches.");
|
||||||
} catch(CacheException ce) {
|
} finally {
|
||||||
|
TestingUtil.killCacheManagers(manager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ ext {
|
||||||
junitVersion = '4.11'
|
junitVersion = '4.11'
|
||||||
h2Version = '1.2.145'
|
h2Version = '1.2.145'
|
||||||
bytemanVersion = '2.1.2'
|
bytemanVersion = '2.1.2'
|
||||||
infinispanVersion = '6.0.0.Final'
|
infinispanVersion = '7.1.0.Final'
|
||||||
jnpVersion = '5.0.6.CR1'
|
jnpVersion = '5.0.6.CR1'
|
||||||
|
|
||||||
libraries = [
|
libraries = [
|
||||||
|
|
Loading…
Reference in New Issue