We have the following architecture:
- application1, which is clustered over two different servers and reacheable as (say): http://www.application1.nl/cluster1/application1
- application2, which is clustered over two different servers and reacheable as (say): http://www.application2.nl/cluster2/application2
We have implemented this in JBoss 5 and the upshot is, that the
<snip>
ManagerBalancerName cluster1
<Location /application1>
ProxyPass balancer://cluster1/application1 stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse balancer://cluster1/application1
</Location
<snip>
part of the apache vhost www.application1.nl (for example) is matching the $PROFILE_HOME/deploy/mod-cluster.sar/META-INF/mod-cluster-jboss-beans.xml part:
<snip>
<property name="balancer">cluster1</property>
<snip>
of the <bean name="HAModClusterService" class="org.jboss.modcluster.ha.HAModClusterService" mode="On Demand"> bean definition.
The same mechanism should also work for JBoss 7 (or JBoss-EAP6), but I haven't found out which parameter to set (for example in the mod-cluster configuration of the slave) [this is a question]. If I just start the node, we see the cluster in the mod_cluster-manager appearing under the first defined virtual host, which I think is a default behaviour.