Skip to content

Commit

Permalink
Upgrade Infinispan to 12.1.7.Final
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kanis authored and hmlnarik committed Jan 8, 2022
1 parent d9d77fe commit 9d5355b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ private void configureRemoteCacheStore(ConfigurationBuilder builder, boolean asy
String jdgServer = config.get("remoteStoreHost", "localhost");
Integer jdgPort = config.getInt("remoteStorePort", 11222);

// After upgrade to Infinispan 12.1.7.Final it's required that both remote store and embedded cache use
// the same key media type to allow segmentation. Also, the number of segments in an embedded cache needs to match number of segments in the remote store.
boolean segmented = config.getBoolean("segmented", false);

builder.persistence()
.passivation(false)
.addStore(RemoteStoreConfigurationBuilder.class)
Expand All @@ -393,6 +397,7 @@ private void configureRemoteCacheStore(ConfigurationBuilder builder, boolean asy
.preload(false)
.shared(true)
.remoteCacheName(cacheName)
.segmented(segmented)
.rawValues(true)
.forceReturnValues(false)
.marshaller(KeycloakHotRodMarshallerFactory.class.getName())
Expand All @@ -408,6 +413,10 @@ private void configureRemoteActionTokenCacheStore(ConfigurationBuilder builder,
String jdgServer = config.get("remoteStoreHost", "localhost");
Integer jdgPort = config.getInt("remoteStorePort", 11222);

// After upgrade to Infinispan 12.1.7.Final it's required that both remote store and embedded cache use
// the same key media type to allow segmentation. Also, the number of segments in an embedded cache needs to match number of segments in the remote store.
boolean segmented = config.getBoolean("segmented", false);

builder.persistence()
.passivation(false)
.addStore(RemoteStoreConfigurationBuilder.class)
Expand All @@ -417,6 +426,7 @@ private void configureRemoteActionTokenCacheStore(ConfigurationBuilder builder,
.preload(true)
.shared(true)
.remoteCacheName(InfinispanConnectionProvider.ACTION_TOKEN_CACHE)
.segmented(segmented)
.rawValues(true)
.forceReturnValues(false)
.marshaller(KeycloakHotRodMarshallerFactory.class.getName())
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
<jakarta.persistence.version>2.2.3</jakarta.persistence.version>
<hibernate.core.version>5.3.20.Final</hibernate.core.version>
<hibernate.c3p0.version>5.3.20.Final</hibernate.c3p0.version>
<infinispan.version>11.0.9.Final</infinispan.version>
<infinispan.protostream.processor.version>4.3.4.Final</infinispan.protostream.processor.version>
<infinispan.version>12.1.7.Final</infinispan.version>
<infinispan.protostream.processor.version>4.4.1.Final</infinispan.protostream.processor.version>
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<jackson.version>2.12.1</jackson.version>
<jackson.databind.version>${jackson.version}</jackson.databind.version>
Expand Down

0 comments on commit 9d5355b

Please sign in to comment.