When you are configuring a domain server, you will find that the clustering subsystem is already part of the main configuration file, domain.xml.
As a matter of fact, the AS7 domain deals with clustering just as a different profile used by the application server. Opening the domain.xml
file, you will see that the application server ships with two profiles:
So, in order to use clustering on a domain, you have at first to configure your server groups to point to the ha profile.
As highlighted, in the socket-binding-group element, we are referencing the hasockets group, which contains all socket bindings used for a cluster: Your last effort will be defining the servers that are part of the domain (and of the cluster). To ease our work, we will reuse the same domain server list that is contained in the distribution.
For each server, you have to refer, within your host.xml
, to the socket binding group named ha-sockets, which we have just shown:Your clustered domain is ready for running. Launch your domain of servers using the standard batch script (domain.bat/domain.sh) and the server groups will now point to the ha profile and form a cluster of two nodes.
Frequently asked Jboss Interview Questions
The clustering communication is carried out, by default, using UDP and multicasts information around the cluster. If there are problems, typically it is because of one of the following reasons:
Actually JGroups ships with two test programs that can be used to test multicast communication: McastReceiverTest and McastSenderTest. Start McastReceiverTest, for example:
java –classpath jgroups-3.0.0.Final.jar
org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port
5555
Then, start McastSenderTest :
java –classpath jgroups-3.0.0.Final.jar
org.jgroups.tests.McastSenderTest -mcast_addr 224.10.10.10 -port 5555
Note
The jgroups-3.0.0.Final.jar can be located in the JBOSS_HOME/modules/org/jgroups/main path of your server distribution
If multicast works correctly, you should be able to type in the McastSenderTest window and see the output in the McastReceiverTest as shown in the following screenshot:
If multicast works correctly, you should be able to type in the McastSenderTest window and see the output in the McastReceiverTest as shown in the following screenshot:
Finally, if you are experiencing troubles with the default multicast address or port, you can change it at any time digging into the jgroups-udp socket binding:
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
JBoss Training | Nov 26 to Dec 11 | View Details |
JBoss Training | Nov 30 to Dec 15 | View Details |
JBoss Training | Dec 03 to Dec 18 | View Details |
JBoss Training | Dec 07 to Dec 22 | View Details |
Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.