Tech-Today
How to create a wildfly cluster
The following steps will help us configure a Wildfly cluster.
*Note that I'm using Wildfly 11
*It took me some time to figure it out so I'm writing it here for reference.
- I'm using the standard-full-ha.xml profile
- In the program arguments add
- -b 192.168.0.x -> or your local IP address. If you have JBoss Tools / Wildfly Server. It is the Hostname in the Wildfly server overview tab. This will let your server available in the network.
- -Djboss.node.name=opencell-alexander1 -> This is the name of your node which will enable clustering.
- -Djboss.bind.address.private=192.168.1.2 -> And finally, this will allow the EJB in your node to see each other. Before doing so, make sure that socking-binding group=jgroups-udp in your standalone config's value is private.
- And finally in the activemq subsystem set server.cluster password.
Here are parts of the configuration for your reference:
Wildfly server's configuration in eclipse:
Parts of standalone-full-ha.xml
//jgroups
<subsystem xmlns="urn:jboss:domain:jgroups:5.0">
<channels default="ee">
<channel name="ee" stack="udp" cluster="ejb"/>
</channels>
//activemq
<subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0">
<server name="default">
<cluster password="${jboss.messaging.cluster.password:secret}"/>
//socket-binding
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
...
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
-
How To Run A Wildfly Server Inside Docker
Before we begin you must configure docker, I am using Ubuntu so I followed the guide here: https://docs.docker.com/engine/installation/linux/ubuntulinux/. Choose the appropriate OS that applies to you. Let's do this in sequence: Checkout and...
-
How To Setup Stomp In Jboss As 7 And Create A Java Client Call
This tutorial will teach us how we can enable stomp in JBoss 7.1.3 and create a sample java client call. What you need: 1.) JBoss AS7.1.3 2.) standalone-full.xml - this is where we will copy the settings Setup JBoss AS 7 1.) 1.) Add extension:...
-
How To Configure Mail Resource In Jboss 7.2 With A Sample Java Client
This tutorial assumes that you have the following installed on your local system: JBoss 7.2eclipse to run a projecta mail server, can be gmailIn this page we will summarize how to configure a mail dataSource in Jboss and create a JavaEE6 client to send...
-
How To Create A Glassfish Cluster
This tutorial will attempt to explain, how to create a Glassfish cluster using the Glassfish's admin interface. To do this, you must have download, install and configured Glassfish's domain1 to start. Steps: 1.) Create nodes (What are nodes? See...
-
Changing Jboss Server's Default Http Port
If you have installed jboss server in: C:\jboss-5.1.0\ then here's what you should do to change the default port (8080) to any port of your choice. 1.) Open the file, C:\jboss-5.1.0\server\default\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml...
Tech-Today