1 Reply Latest reply on Oct 14, 2005 8:05 PM by brian.stansberry

    Proper configuration of cluster partitions

    dhannum

      Hi,

      I am trying to create two separate cluster partitions such that I have SSO across apps in both partitions (i.e. across the entire cluster), but I only have session replication across one partition or the other. I have read that this is possible in JBoss 4. I am using 4.0.2.

      My app does not use EJB's but all the docs I have found relate to establishing partitions for EJB's in the jboss.xml file. The only configuration I did was set the partitionName attribute of the org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn valve in Tomcat's server.xml. The two machines each have a different partitionName, which I thought made them two separate partitions.

      Apparently, that's not all I need to do because I have session-scoped Spring beans that are being propogated across these machines. (I know because if I kill the one I'm on, the other machine still knows my session state)

      I wasn't able to find any documentation (even in the Wiki) for how to tell JBoss which machines are in which partitions. Could someone please point me toward some, or tell me what I need to do?

      Thank you
      Dan

        • 1. Re: Proper configuration of cluster partitions
          brian.stansberry

          Sorry for the very slow reply.

          From what you wrote, I think you want something analogous to the following:

          1) Four servers A, B, C, D that for SSO purposes are in one partition.
          2) For HttpSession replication purposes A and B are in a partition and C and D are in a different partition.

          To do this:

          1) Edit the tc5-cluster-service.xml file on C and D and change the multicast address or port so they're different from the version of the file you have on A and B. Now A/B will be one partition, C/D another.
          2) Make a copy of tc5-cluster-service.xml; call it sso-cluster-service.xml.
          3) Edit the multicast port and address so they are different from those used in either of the tc5-cluster-service.xml files.
          4) In the top of the file, where it says

          <mbean code="org.jboss.cache.TreeCache"
           name="jboss.cache:service=TomcatClusteringCache">


          change it to

          <mbean code="org.jboss.cache.TreeCache"
           name="jboss.cache:service=SSOClusteringCache">


          5) Put the sso-cluster-service.xml file in the deploy dir of all 4 servers. Now you have a TreeCache that is shared across all 4 servers.
          6) Edit the server.xml file in each server to add the following attribute to the ClusteredSingleSignOn's element:

          treeCacheName="jboss.cache:service=SSOClusteringCache"


          Now ClusteredSSO will use the 4-server TreeCache rather than either of the 2-server caches.