WebSphere Liberty 与 Redis 集成以实现 HTTP 会话持久性

问题描述 投票:0回答:1

我们正在尝试在我们的环境中替换WebSphere Extremescape,并计划使用redis。我们使用 WebSphere Extremescale 的唯一原因是提供 HTTP 会话持久性。我相信我们可以使用 jcache/redisson 让 WebSphere Liberty 使用 redis 进行会话持久化。有没有人这样做过 - 如果是的话,请分享您的 redisson-jcache.yaml 和 server.xml 配置

谢谢,

尝试设置环境

redis websphere-liberty redisson jcache
1个回答
0
投票

好的,简单总结一下其他答案:

添加功能:

<feature>sessionCache-1.0</feature>

定义库:

<library id="jCacheVendorLib">
  <fileset dir="${shared.resource.dir}/redisson" includes="*"/>
</library>

在缓存配置中使用库:

    <httpSessionCache libraryRef="jCacheVendorLib"
                      uri="file:${shared.resource.dir}/redisson/redisson-jcache.yaml" />

redisson-jcache.yaml 的内容:

clusterServersConfig:
  password: ${clusterServerConfig.password}
  nodeAddresses:
  - ${clusterServerConfig.nodeAddresses}
© www.soinside.com 2019 - 2024. All rights reserved.