diff --git a/plugin/src/main/resources/org/wildfly/plugins/bootablejar/maven/cloud/openshift-infinispan-script.cli b/plugin/src/main/resources/org/wildfly/plugins/bootablejar/maven/cloud/openshift-infinispan-script.cli index f5dba3f2..9a8210e1 100644 --- a/plugin/src/main/resources/org/wildfly/plugins/bootablejar/maven/cloud/openshift-infinispan-script.cli +++ b/plugin/src/main/resources/org/wildfly/plugins/bootablejar/maven/cloud/openshift-infinispan-script.cli @@ -1,8 +1,7 @@ -# Infinispan, add a more efficient cache if we already have the dist distributed cache. +# Infinispan +# Add a distributed cache optimized for the cloud called 'sessions' if we already have the dist distributed cache. if (outcome == success) of /subsystem=infinispan/cache-container=web/distributed-cache=dist:read-resource - /subsystem=infinispan/cache-container=web/replicated-cache=repl:add - /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value=repl) - /subsystem=infinispan/cache-container=web/replicated-cache=repl/component=locking:add(isolation=REPEATABLE_READ - /subsystem=infinispan/cache-container=web/replicated-cache=repl/component=transaction:add(mode=BATCH - /subsystem=infinispan/cache-container=web/replicated-cache=repl/store=file:add + /subsystem=infinispan/cache-container=web/distributed-cache=sessions:add + /subsystem=infinispan/cache-container=web/distributed-cache=sessions/component=expiration:add(interval=0) + /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache,value=sessions) end-if \ No newline at end of file diff --git a/tests/src/test/java/org/wildfly/plugins/bootablejar/maven/goals/DefaultCloudConfigurationTestCase.java b/tests/src/test/java/org/wildfly/plugins/bootablejar/maven/goals/DefaultCloudConfigurationTestCase.java index 1d0ea52c..5a087b6b 100644 --- a/tests/src/test/java/org/wildfly/plugins/bootablejar/maven/goals/DefaultCloudConfigurationTestCase.java +++ b/tests/src/test/java/org/wildfly/plugins/bootablejar/maven/goals/DefaultCloudConfigurationTestCase.java @@ -47,7 +47,7 @@ public void testDefaultConfiguration() assertTrue(mojo.contextRoot); mojo.execute(); final Path dir = getTestDir(); - checkJar(dir, true, true, null, null, mojo.recordState, "default-cache=\"repl\"", "org.jboss.as.clustering.jgroups", "proxy-address-forwarding=\"true\"", "bindall"); + checkJar(dir, true, true, null, null, mojo.recordState, "default-cache=\"sessions\"", "org.jboss.as.clustering.jgroups", "proxy-address-forwarding=\"true\"", "bindall"); checkDeployment(dir, true); } }