[mod_cluster-dev] mod-cluster and domains with sticky sessions

Bela Ban bban at redhat.com
Tue Jul 21 09:17:41 EDT 2009



jean-frederic clere wrote:
> On 07/21/2009 02:46 PM, Bela Ban wrote:
>> 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 ?
>
> #2 with AS (5.x and up)/
> #1 for Tomcat/JbossWEB and 4.2.x/ 4.3.x.


Hmm, #2 did *not* work with AS 5.1/mod-cluster, but #1 did ! So it's 
just the other way round ! (?)


> Looks like a bug... Would need a way to reproduce it, are you sure it 
> is not MODCLUSTER-81?

Yes, I didn't play around with disabling webapps/nodes.


> Where is the mod_jk one?
http://lists.jboss.org/pipermail/mod_cluster-dev/2009-January/000043.html


-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss


More information about the mod_cluster-dev mailing list