3 Replies Latest reply on Nov 10, 2006 4:22 PM by azhurakousky

    TwoClustersSameNetwork inconsistency

      The TwoClustersSameNetwork page is confusing. I'm trying to set up two environments with the same software - a test environment and a production environment.

      I get that there are three factors that affect the cluster:

      * Partition name
      * Multicast address
      * Multicast port

      The first paragraph of TwoClustersSameNetwork says that to isolate two clusters, I must change all three things. Why is this?

      The last paragraph of the page says that on JDK1.4 I must change both the address and the port. This implicitly conflicts with the first paragraph. I'm on JDK1.5, so can I just set the address? Do I still need to change the partition name?

      I've added some italicized questions to the wiki page to help.

      Thanks,
      Jeff Schnitzer
      Kink.com

        • 1. Re: TwoClustersSameNetwork inconsistency

          To isolate you only have to change two:
          Partition Name - uniquely identifies membership group (see JGroups docs and/or Jboss admin guide)
          Multicast Address - IP JGroups will use to multicast (more info in JBoss admin guide)

          If those values are the same on two nodes that are on the same subnet, they will join into a cluster.
          If you only change Partition Name, the nodes will not join, however you'll be seeing an iritating message in your loggs telling you that some node is trying to join (becouse multicast IP is still the same), but refused. . . and so on

          • 2. Re: TwoClustersSameNetwork inconsistency

            Thanks. What would happen if I just changed the multicast address and left the partition name alone?

            I'm using EJB3 beans, which define the partition name with a @Clustered annotation. Will it work if I do this?

            @Clustered(partition="${jboss.partition.name:DefaultPartition}")

            Since my code must be identical in both environments, I need the partition name to be defined in the container setup (a -D flag is perfect).

            Thanks,
            Jeff

            • 3. Re: TwoClustersSameNetwork inconsistency

              Good question
              First, yes it willl work with the notation you specified. I am not sure if you know, but I'll explain anyway about these types of notation, since JBoss is using them everywhere.

              ${jboss.partition.name:DefaultPartition} reads as
              if System property wit the name jboss.partition.name exist, then use its value, otherwise default it to the name specified after ":" (which in your case is DefaultPartition)


              So, you can set it as System Property (-D option) at server startup. There is also another way of doing it as well. So here is what you can do:

              1. run -c <server_config> -Djboss.partition.name=MyPartition -u 230.1.2.10
              2. run -c <server_config> -g MyPartition -u 230.1.2.10

              Execute run -help to get more startup options. As far as the once I used in the examples:
              -g Partition Name
              -u Multicast IP

              Regards