Jboss 6.1集群搭建以及session复制配置

以两台主机为例,host1:192.168.2.178 host2 192.168.2.179

1,jboss安装,略。
2,修改文件
host1:
${JBOSS_HOME}/server/all/deploy/cluster/jgroups-channelfactory.sar/META-INF/jgroups-channelfactory-stacks.xml
修改如下两处
         <TCPPING timeout="3000"
                  initial_hosts="{192.168.2.179[7600],192.168.2.178[7600]}"
                  port_range="1"
                  num_initial_members="3"/>
         <TCPPING timeout="3000"
                  initial_hosts="{192.168.2.178[7600],192.168.2.179[7600]}"
                  port_range="1"
                  num_initial_members="3"/>

(注意jboss上面两处默认是注释掉得,需要打开。)


这两处的initial_hosts顺序正好相反
host2:
initial_hosts顺序反过来即可。

 

3,修改文件
host1:
${JBOSS_HOME}/server/all/deploy/jbossweb.sar/server.xml
<Engine...加上jvmRoute="server1"
host2:jvmRoute="server2"

4,jboss启动
./run.sh -c all -b 192.168.2.178
./run.sh -c all -b 192.168.2.179
如上,后面需要加上host
5,apache配置:jk略

 

你可能感兴趣的:(jboss session复制)