keycloak-uncached

Details

diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
index d11e2b9..4e8e1c8 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
@@ -137,4 +137,19 @@ if (result == NONE) of /profile=$clusteredProfile/subsystem=infinispan/cache-con
   echo
 end-if
 
-echo *** End Migration of /profile=$clusteredProfile ***
\ No newline at end of file
+# Migrate from 2.5.0 to 2.5.1
+# NO CHANGES
+
+# Migrate 2.5.1 to 2.5.4
+if (result != REPEATABLE_READ) of /profile=$clusteredProfile/subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:read-attribute(name=isolation)
+  echo Changing ejb cache locking to REPEATABLE_READ
+  /profile=$clusteredProfile/subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:write-attribute(name=isolation,value=REPEATABLE_READ)
+  echo
+end-if
+
+if (outcome == success) of /profile=$clusteredProfile/subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:read-resource
+   echo Removing Hibernate immutable-entity cache
+   /profile=$clusteredProfile/subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:remove
+end-if
+
+echo *** End Migration of /profile=$clusteredProfile ***
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
index b24819e..1fa33bc 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
@@ -125,4 +125,19 @@ if (result == NONE) of /profile=$standaloneProfile/subsystem=infinispan/cache-co
   echo
 end-if
 
-echo *** End Migration of /profile=$standaloneProfile ***
\ No newline at end of file
+# Migrate from 2.5.0 to 2.5.1
+# NO CHANGES
+
+# Migrate 2.5.1 to 2.5.4
+if (result != REPEATABLE_READ) of /profile=$standaloneProfile/subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:read-attribute(name=isolation)
+  echo Changing ejb cache locking to REPEATABLE_READ
+  /profile=$standaloneProfile/subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:write-attribute(name=isolation,value=REPEATABLE_READ)
+  echo
+end-if
+
+if (outcome == success) of /profile=$standaloneProfile/subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:read-resource
+   echo Removing Hibernate immutable-entity cache
+   /profile=$standaloneProfile/subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:remove
+end-if
+
+echo *** End Migration of /profile=$standaloneProfile ***
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli
index 3398f17..4b71f66 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli
@@ -39,6 +39,7 @@ if (result == undefined) of /subsystem=infinispan/cache-container=keycloak/local
   echo Updating authorization cache container..
   /subsystem=infinispan/cache-container=keycloak/local-cache=authorization/component=eviction/:write-attribute(name=strategy,value=LRU)
   /subsystem=infinispan/cache-container=keycloak/local-cache=authorization/component=eviction/:write-attribute(name=max-entries,value=100)
+  echo
 end-if
 
 # Migrate from 2.0.0 to 2.1.0
@@ -132,4 +133,19 @@ if (result == NONE) of /subsystem=infinispan/cache-container=keycloak/local-cach
   echo
 end-if
 
-echo *** End Migration ***
\ No newline at end of file
+# Migrate from 2.5.0 to 2.5.1
+# NO CHANGES
+
+# Migrate 2.5.1 to 2.5.4
+if (result != REPEATABLE_READ) of /subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:read-attribute(name=isolation)
+  echo Changing ejb cache locking to REPEATABLE_READ
+  /subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:write-attribute(name=isolation,value=REPEATABLE_READ)
+  echo
+end-if
+
+if (outcome == success) of /subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:read-resource
+   echo Removing Hibernate immutable-entity cache
+   /subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:remove
+end-if
+
+echo *** End Migration ***
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli
index 7b5dcc7..cfa06c2 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli
@@ -142,4 +142,19 @@ if (result == NONE) of /subsystem=infinispan/cache-container=keycloak/local-cach
   echo
 end-if
 
-echo *** End Migration ***
\ No newline at end of file
+# Migrate from 2.5.0 to 2.5.1
+# NO CHANGES
+
+# Migrate 2.5.1 to 2.5.4
+if (result != REPEATABLE_READ) of /subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:read-attribute(name=isolation)
+  echo Changing ejb cache locking to REPEATABLE_READ
+  /subsystem=infinispan/cache-container=ejb/local-cache=persistent/component=locking/:write-attribute(name=isolation,value=REPEATABLE_READ)
+  echo
+end-if
+
+if (outcome == success) of /subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:read-resource
+   echo Removing Hibernate immutable-entity cache
+   /subsystem=infinispan/cache-container=hibernate/local-cache=immutable-entity/:remove
+end-if
+
+echo *** End Migration ***
diff --git a/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties b/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties
index fab6bdb..c88d690 100644
--- a/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties
+++ b/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties
@@ -1,6 +1,12 @@
 # IMPORTANT: If you change this file you should also make equivalent changes
 # to src/main/resources/cli/default-keycloak-subsys-config.cli
 # The CLI file is packaged with the subsystem and extracted by the overlay distribution.
+#
+# Also, you should update the migrate-*.cli scripts in
+# <keycloak>/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin
+#
+# Furthermore, you should run the tests in
+# <keycloak>/testsuite/integration-arquillian/tests/other/server-config-migration
 
 keycloak.server.subsys.default.config=\
 <subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">\
diff --git a/wildfly/server-subsystem/src/main/resources/subsystem-templates/README.md b/wildfly/server-subsystem/src/main/resources/subsystem-templates/README.md
new file mode 100644
index 0000000..616f8be
--- /dev/null
+++ b/wildfly/server-subsystem/src/main/resources/subsystem-templates/README.md
@@ -0,0 +1,8 @@
+Subsystem Config Files
+========
+
+IMPORTANT: If you change files in this directory you should also update the migrate-*.cli scripts in  
+`<keycloak>/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin`
+
+Furthermore, you should run the tests in  
+`<keycloak>/testsuite/integration-arquillian/tests/other/server-config-migration`
\ No newline at end of file