When you deploy the different Rule Execution Server components
(console and runtime) on a JBoss application server, you activate
a single instance of the console in a JBoss cluster and use standard
cluster management for the runtime.
About this task
The Rule Execution Server console
automatically discovers all the XUs deployed in the cluster before
any ruleset has been executed. The management model finds the list
of members in a cluster with the TCP/IP Notification protocol, and
then uses the TCP/IP remote connection on each cluster member to notify
all XU instances.
Procedure
To deploy Rule Execution Server in
a cluster:
- Make sure you have configured user access to Rule Execution Server (see Step 4: Configuring access to Rule Execution Server).
- Configure the Rule Execution Server console
for TCP/IP management (see Configuring the Rule Execution Server EAR for TCP/IP
management).
- Configure the execution units (XU) to connect to a TCP/IP
management server (see Configuring execution units (XU) to connect to a TCP/IP
management server).
- Start JBoss and open the management console if you are
using this approach:
- Go to <JBOSS_HOME>/bin.
- Enter ./domain.[sh|bat]
- Open the JBoss Management Console.
- In the Domain tab, start the other server group.
- Configure the datasource for the full and full.ha profiles. For example, if you are using the command line approach and
the Derby database, enter:
./jboss-cli.sh --connect 'xa-data-source add --profile=full --name=RESDatasource --jndi-name=java:/jdbc/resdatasource --user-name=RES --password=RES --driver-name=derby --xa-datasource-class=org.apache.derby.jdbc.ClientXADataSource
./jboss-cli.sh --connect '/profile=full/subsystem=datasources/xa-data-source=RESDatasource/xa-datasource-properties=CreateDatabase:add(value=Create)'
./jboss-cli.sh --connect '/profile=full/subsystem=datasources/xa-data-source=RESDatasource/xa-datasource-properties=DatabaseName:add(value=/tmp/data/derby/resdb)'
./jboss-cli.sh --connect 'xa-data-source --profile=full enable --name=RESDatasource'
- Deploy the XU with the TCP/IP notification activated in
a clustered JBoss domain.
- Click Deployments.
- Click Add.
- Browse to the XU .rar file that has TCP/IP activated.
- Click Next and then Save.
- Deploy the modified Rule Execution Server console.
- Click Add and then Add again.
- Browse to the Rule Execution Server console
EAR file with TCP/IP activated.
- Assign the deployed applications to the groups:
- Assign the jrules-res-xu-JBOSS6EAP.rar XU
to the Other Server Group.
- Assign the jrules-res-xu-JBOSS6EAP.rar XU
to the Main Server Group.
- Assign jrules-res-management-JBOSS6EAP.ear to
the Other Server Group.
- Verify the configuration.
- To open the Rule Execution Server console, type res at
the root URL on the host machine. For example: http://localhost:<port>/res.
Note: In cluster mode, in the Management Console, the port number
is offset from the default port.
- Sign in to the Rule Execution Server console.
- Click the Diagnostics tab.
- Click Run Diagnostics.
- Go to the Server Info tab. You should see the XUs attached to the Rule Execution
Server console.