Configuring Rule Execution Server in scoped mode

When the default configuration in shared mode is not appropriate for your use case, you can configure Rule Execution Server so that it is scoped to a single Java™ EE application.

About this task

By default, when you follow the configuration guide for your application server, you configure Rule Execution Server in shared mode.

For example, see Deploying the XU RAR for a WebSphere® Application Server configuration.

The benefits of scoping XU resources to a single application, as opposed to sharing XU resources are stated in Packaging and deployment.

Important:

In the deployment phase of the EAR file, you must create a Java 2 connection factory (J2C). This step is necessary to add the JNDI name of the resource adapter.

Tip:

If you package a rule session factory inside an application EAR, you can remove the JNDI definitions from the rule session JAR file.

Procedure

  1. Write and compile the source code, including the basic tasks of the client, and your business logic.
  2. Specify the deployment descriptors.
  3. Package the .class, .jsp, and .html files, deployment descriptors, and the Rule Execution Server .rar file into a Java EE application EAR file.

    Do not modify the RAR.

  4. Declare the RAR module inside the application.xml file, as follows:
    <application>
        ....
        <module>
            <connector>jrules-res-xu-<appserver>.rar</connector>
        </module>
        ....
    </application>