OK, I read through the archives of this list and came up with a solution
for mod-jk, but apparently nobody has so far used domains/sticky
sessions with *mod-cluster* !
I found 2 different ways of doing this:
#1 server.xml:
---------------------
<Listener className="org.jboss.modcluster.ModClusterListener"
advertize="true" domain="${jboss.Domain:DefaultDomain}"
/>
#2 and in mod-cluster-jboss-beans.xml:
---------------------------------------------------------
<bean name="HAModClusterService" ...>
<property
name="domain">${jboss.Domain:DefaultDomain}</property>
</bean>
and then started several instances:
./run.sh -b 192.168.1.5 -c all -g *D1* -u 230.1.1.1 -m 10500
-Djboss.jvmRoute=*node1* -Djboss.Domain=*D1*
./run.sh -b 192.168.1.9 -c all -g *D1* -u 230.1.1.1 -m 10500
-Djboss.jvmRoute=*node2* -Djboss.Domain=*D1*
and
./run.sh -b 192.168.1.10 -c all -g *D2* -u 230.2.2.2 -m 11500
-Djboss.jvmRoute=*node3* -Djboss.Domain=*D2*
So we have domains D1 (cluster D1 with node1 and node2) and D2 (cluster
D2 with node3).
#1 above seems to work half way, #2 doesn't.
Questions
========
* What is the recommended way of setting of domains ?
o I assume #1, but that's not documented anywhere, I just
found out accidentally through a port via google
* Sometimes, a webapp on node2 fails over to node3 rather than node1
Can someone look into this ? This information should be available via a
web page, similar to the one for mod-jk !
--
Bela Ban
Lead JGroups / Clustering Team
JBoss