Java Reference
In-Depth Information
Now that we are done with the client, our last effort would be deploying a jboss-
ejb-client.properties file, which will contain the list of servers that will be ini-
tially contacted (via remoting) by our client application:
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=node1,node2
remote.connection.node1.host=localhost
remote.connection.node1.port = 4447
remote.connection.node1.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.node2.host=localhost
remote.connection.node2.port = 4647
remote.connection.node2.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
As you can see from this file, we assume that you are running a two-node cluster
on the localhost address, the first one running the default port settings and the
second one using an offset of 200 (just as shown in the second paragraph of the
Starting a cluster of standalone nodes section).
Replace the remote.connection.nodeX.host variable value with the actual IP
or host if you are running your server nodes on different machines from your client.
Deploying and testing high availability
Deploying an application to a cluster can be achieved in several ways; if you prefer
automation instead of copying each archive into the deployments folder, you can
re-use the CLI deployment script contained in the earlier chapter.
Alternatively, if you are using JBoss'Maven plugin to deploy, you can parameterize its
configuration, including the hostname and the port as variables, which will be passed
to the command line:
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
Search WWH ::




Custom Search