5 Replies Latest reply on Nov 3, 2015 3:53 PM by pferraro

    WildFly 10 cluster defaults to "ee" channel or default stack ?

    mylos78

      Hi all!

      I can see WildFly 10 includes a default "ee" JGroups channel. I wonder, in case I have set also a default stack, which one prevails?

      For example, in the following configuration, what will be the default stack used by ejb and web applications ? udp or tcp ?

      <subsystem xmlns="urn:jboss:domain:jgroups:4.0">
          <channels default="ee">
              <channel name="ee" stack="udp"/>
          </channels>
          <stacks default="tcp">
          . . . . . .
      </subsystem>
      
      

      Thanks!

        • 1. Re: WildFly 10 cluster defaults to "ee" channel or default stack ?
          jaysensharma

          With the above default configuration as above it will be using the "udp". Hence the the default stack used by ejb and web applications will also be UDP.

          It can also be verified by running the JGroup in DEBUG mode.

           

          /subsystem=logging/logger=org.jgroups.protocols/:add(category=org.jgroups.protocols,level=DENUG)
          

          OR

           

                      <logger category="org.jgroups.protocols">
                          <level name="DEBUG"/>
                      </logger>
          
          • 2. Re: WildFly 10 cluster defaults to "ee" channel or default stack ?
            mylos78

            Thanks Jay. So now the recommended way to change the default stack (say from UDP to TCP) is via the Channel "ee":

            /subsystem=jgroups/channel=ee/:write-attribute(name=stack,value=tcp)
            

            And not any more through the default-stack of jgroups ?

            /subsystem=jgroups/:write-attribute(name=default-stack,value=tcp)
            

            Thanks!

            • 3. Re: WildFly 10 cluster defaults to "ee" channel or default stack ?
              jaysensharma

              If you do not define any  "stack="udp" OR "stack="tcp" while defining the channel, then it will take the default

               

              Example-1). stack="udp" is defined at the channel level then that cluster will run in UDP mode.

              <subsystem xmlns="urn:jboss:domain:jgroups:4.0">
                  <channels default="ee">
                      <channel name="ee" stack="udp"/>    <!-- Will cause running it in UDP mode -->
                  </channels>
                  <stacks default="tcp">
                  . . . . . .
              </subsystem>
              
              
              

               

               

               

               

              Example-2). As there is no "stack" is defined at the channel level, Hence it will take the <stacks default="tcp"> and will run in TCP mode

              <subsystem xmlns="urn:jboss:domain:jgroups:4.0">
                  <channels default="ee">
                      <channel name="ee"/>   <!-- No stack specified hence it will use <stacks default="tcp"> and run in TCP  -->
                  </channels>
                  <stacks default="tcp">
                  . . . . . .
              </subsystem>
              
              
              

               

               

              Example-3). By mistake if we do not specify the "stack" anywhere like following then we will see the error:

               

                      <subsystem xmlns="urn:jboss:domain:jgroups:4.0">
                          <channels default="ee">
                              <channel name="ee"/>
                          </channels>
                          <stacks>
                              <stack name="udp">
              

               

              Then it will cause the following error because no default stack is defined.

               

              15:36:55,348 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 25) WFLYCTL0013: Operation ("add") failed - address: ([
                  ("subsystem" => "jgroups"),
                  ("channel" => "ee")
              ]) - failure description: "WFLYCTL0155: stack may not be null"
              
              • 4. Re: WildFly 10 cluster defaults to "ee" channel or default stack ?
                mylos78

                Thanks for the clear reply Jay!

                • 5. Re: WildFly 10 cluster defaults to "ee" channel or default stack ?
                  pferraro

                  FYI, the default stack attribute is effectively deprecated and which is why it was dropped from the default configuration, since stack is now a required attribute of a channel.  At its most basic, the JGroups subsystem provides instances of ChannelFactory, of which there are 2 types: a ChannelFactory (that creates JChannels) per stack, and a ChannelFactory (that creates ForkChannels) per channel.  As of WF10, the default ChannelFactory creates ForkChannels created from the default channel.