Version 5

    You can build JBoss Portal to work on a cluster of JBoss.


    In order to do that you need to copy (or edit if it already exists) the file build/ and set the property portal.clustered to true, then you build JBoss Portal.


    Otherwise you can turn a non clustered version into a clustered version by editing the deployment descriptors and uncomment some part and comment some other. For instance, this XML fragment is located in jboss-portal.sar/META-INF/jboss-service.xml :


          | Uncomment in cluster mode : have the deployment of objects run as a clustered singleton
          <attribute name="TargetName">portal:deploymentFactory=Object</attribute>
          <attribute name="TargetStartMethod">registerFactory</attribute>
          <attribute name="TargetStopMethod">unregisterFactory</attribute>


    Likewise you will need to comment some other fragments based on the same principales.


    The file you need to edit are :


    - jboss-portal.sar/META-INF/jboss-service.xml
    - jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml
    - jboss-portal.sar/portal-server.war/WEB-INF/web.xml
    - jboss-portal.sar/conf/hibernate/instance/hibernate.cfg.xml
    - jboss-portal.sar/conf/hibernate/portal/hibernate.cfg.xml
    - jboss-portal.sar/conf/hibernate/user/hibernate.cfg.xml



    remember :

                 -Using server/all for make clustering work, not the default server.

                 -If you are a window user, edit the file server/all/deploy/cluster-service.xml ((On Windows machines,

                  because of the media sense feature being broken with multicast (even after disabling media sense) set the

                  UDP protocol's loopback attribute to true


                <UDP mcast_addr="${jboss.partition.udpGroup:}" mcast_port="45566"                ip_ttl="8" ip_mcast="true"                mcast_send_buf_size="800000" mcast_recv_buf_size="150000"                ucast_send_buf_size="800000" ucast_recv_buf_size="150000"                loopback="true"/>             


    How does it work ?


    JBoss Portal leverages various clustered services of JBoss AS :


    1. JBoss Cache

    2. JBoss HA Singleton

    3. HA-JNDI


    JBoss Cache

    JBoss Cache is used to replicate the data among the different hibernate session factories that are deployed in each node of the cluster. It is also used by the authorization framework to replicate data among the different policies.


    JBoss HA Singleton

    The HA Singleton is used in two places.


    The first one we make the deployer a singleton on the cluster in order to avoid concurrencies issues when deploying the various -object.xml files. Indeed without that each node would try to create the same objects in the database.


    The other place we use the singleton is with JCR. The jackrabbit server indeed is not able to run in a cluster by itself, therefore we make an singleton on the cluster. That provides us HA CMS which is similar to the current HA JBossMQ provided in JBoss AS.



    Used to replicate a proxy that will talk to the HA CMS on the cluster.