11.7. 使用外部 JGroups 堆栈
在 infinispan.xml
文件中引用定义自定义 JGroups 堆栈的外部文件。
流程
将自定义 JGroups 堆栈文件添加到
$RHDG_HOME/server/conf
目录。另外,您还可以在声明外部堆栈文件时指定绝对路径。
使用
stack-file
元素引用外部堆栈文件。<infinispan> <jgroups> <!-- Creates a "prod-tcp" stack that references an external file. --> <stack-file name="prod-tcp" path="prod-jgroups-tcp.xml"/> </jgroups> <cache-container default-cache="replicatedCache"> <!-- Use the "prod-tcp" stack for cluster transport. --> <transport stack="prod-tcp" /> <replicated-cache name="replicatedCache"/> </cache-container> <!-- Cache configuration goes here. --> </infinispan>