Deploying Rule Execution Server in a cluster

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:

  1. Make sure you have configured user access to Rule Execution Server (see Step 4: Configuring access to Rule Execution Server).
  2. Configure the Rule Execution Server console for TCP/IP management (see Configuring the Rule Execution Server EAR for TCP/IP management).
  3. 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).
  4. Start JBoss and open the management console if you are using this approach:
    1. Go to <JBOSS_HOME>/bin.
    2. Enter ./domain.[sh|bat]
    3. Open the JBoss Management Console.
    4. In the Domain tab, start the other server group.
  5. 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'  
  6. Deploy the XU with the TCP/IP notification activated in a clustered JBoss domain.
    1. Click Deployments.
    2. Click Add.
    3. Browse to the XU .rar file that has TCP/IP activated.
    4. Click Next and then Save.
  7. Deploy the modified Rule Execution Server console.
    1. Click Add and then Add again.
    2. Browse to the Rule Execution Server console EAR file with TCP/IP activated.
  8. Assign the deployed applications to the groups:
    1. Assign the jrules-res-xu-JBOSS6EAP.rar XU to the Other Server Group.
    2. Assign the jrules-res-xu-JBOSS6EAP.rar XU to the Main Server Group.
    3. Assign jrules-res-management-JBOSS6EAP.ear to the Other Server Group.
  9. Verify the configuration.
    1. 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.
    2. Sign in to the Rule Execution Server console.
    3. Click the Diagnostics tab.
    4. Click Run Diagnostics.
    5. Go to the Server Info tab. You should see the XUs attached to the Rule Execution Server console.