I have two computer with the Ip address are 172.16.1.151 and 172.16.1.153 and they are all the windows OS。I install two jboss5.1 on them,for the 151 computer i start the jboss with the follow command:
run.bat -c all -g GillionPartition -u 126.96.36.199 -b 172.16.1.151 -Djgroups.bind_addr=172.16.1.151 -Djboss.messaging.ServerPeerID=3 -Djboss.service.binding.set=ports-02
the start Print Screen is follow:
and for 153 computer the start command like this:
run.bat -c all -g GillionPartition -u 188.8.131.52 -b 172.16.1.153 -Djgroups.bind_addr=172.16.1.153 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-default
and the start Print Screen is follow:
but when i access the application i deploy on the two jboss, the session didn't replication successfully.
if i take the jboss AS on 151 computer copy to 153,and start it with the command:
run.bat -c all -g GillionPartition -u 184.108.40.206 -b 172.16.1.153 -Djgroups.bind_addr=172.16.1.153 -Djboss.messaging.ServerPeerID=3 -Djboss.service.binding.set=ports-02
and then when i test my application , the session can replication successfully.
I have use the jgroup testdemo to check the two computer can find and communication with each other.
the test step is that:
I open an IE and login in the test application on 153,and input the url:
there are an input Text and a submit button on this page,when i input something like 'test111' and check the button I will set the 'test111' into the session with the key 'name'. then the page forward to the test.jsp whose url is :
on this page just use the session.getAttribute('name') and print it onto the console. when the page forward to it i can see the 'test111' on the console.
then I put the ctrl+n on the test.jsp page and input the follow url:
if another jboss deploy on the 153 computer:
then I can see the 'test111' on the jboss's console with the port 8280.
if another jboss deploy on the 151 computer:
I can not see the 'test111' on the jboss's console on the 151 computer.