I want to be sure I have this right:
You restart the servers, and access your test.jsp. You see replication. How do you know replication happens?
Thereafter if you do anything else, no replication happens. Again, how do you know it doesn't happen.
With SET_AND_NON_PRIMITIVE_GET, the setAttribute() call will trigger a replication. The getAttribute() call won't, as String counts as "primitive".
Let me give you a better example:
I have 2 clusters (A: 192.168.1.1 and B: 192.168.1.2) on each of them i installed your test application ReplicatedCounter http://wiki.jboss.org/wiki/Wiki.jsp?page=ReplicatedCounter by changing ip address in my local file "hosts" i can access each cluster using the same url in my browser: http://myapplication:8080/counter
i restarted both applications. On cluster A i refreshed the counter page 10 times (Counter = 10) switch to cluster B (by changing ip address in "hosts" file ) refreshed the page and I got Counter = 11 (so far replication is working correctly). Been on cluster B i increased counter up to 20 and switch back to cluster A. But now i see 11 again. (should be 21) .
As i can't see any exceptions in log file. Any idea what i am doing wrong here?
Thanks, much clearer :)
What you're doing sounds fine, and the behavior you report sounds like a bug. So I searched JIRA for 4.0.1 bugs and found http://jira.jboss.com/jira/browse/JBAS-60. That would cause the symptom you report -- once the session is active on cluster A the manager is unaware of replication traffic from the other node. It was fixed for 4.0.2.
I see, do i need to stick with jboss-cache.jar that will come with Jboss 4.0.2 or update it to latest one?
You can upgrade. However, if you are going to move to 4.0.2, I'd recommend going to 4.0.4.
Thank you, Brian. now it is working fine!