2

我正在开发一个应用程序来管理分布式环境中的缓存一致性。我有一个集群的 weblogic 环境,其中有多个托管服务器(可能在不同的 IP 上)。

将在所有托管服务器中部署一个 java 应用程序。托管服务器 1 中的应用程序可以更新缓存,它必须反映在托管服务器 2 的缓存中。

我发现 JCS 横向缓存适用于此。我正在努力为这种情况配置 ccf。

jcs.auxiliary.LTCP.attributes.TcpServers=localhost:XXXX,localhost:YYYY
jcs.auxiliary.LTCP.attributes.TcpListenerPort=ZZZZZ

有人可以解释一下:

  • 如何创建以上两个配置?
  • 我如何知道要配置的端口?

提前致谢。

4

1 回答 1

0

查看此链接: http ://commons.apache.org/proper/commons-jcs/LateralTCPAuxCache.html

有两种类型的配置 TCP 和 UDP。TCP配置需要配置文件中的IP地址和端口号:

jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111,localhost:1112jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
jcs.auxiliary.LTCP.attributes.AllowGet=false

上面的链接对属性及其工作方式有更多描述。我将自己使用这些配置。会告诉你这件事的进展的。

-比尼

于 2014-04-04T18:12:36.833 回答