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.
<logger category="org.jgroups.protocols"> <level name="DEBUG"/> </logger>
Thanks Jay. So now the recommended way to change the default stack (say from UDP to TCP) is via the Channel "ee":
And not any more through the default-stack of jgroups ?
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"
Thanks for the clear reply Jay!
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.