Step 7: Deploying the XU RAR

After you have deployed the MBean descriptors, you deploy the resource adapter archive (RAR) for the execution unit (XU) to WebSphere® Application Server.

Before you begin

You deploy the XU resource archive from the WebSphere Integrated Solutions Console. Log in to the console as explained in Before you start: Opening the administration console. Operational Decision Manager supports JDK7, but make sure to use IBM® WebSphere SDK Java™ Technology Edition version 7.0.5 or later. In addition, you must follow a specific procedure to deploy the XU. For more information, see the following technote: http://www.ibm.com/support/docview.wss?uid=swg1IV45202.

To ensure that Rule Execution Server can locate the resource bundles, complete the following steps for the deployment manager, node agents and cluster members:
  1. In the Websphere Integrated Solutions Console, click Servers > Server Types > WebSphere application servers > MyServer.
  2. In the Server Infrastructure section, click Java and Process Management > Process definition.
  3. From the Additional Properties, select Java Virtual Machine.
  4. In the Generic JVM arguments field, type the following line: -Djdk.logging.allowStackWalkSearch=true.
  5. Restart the server.

About this task

This phase of the Rule Execution Server configuration consists in deploying the execution unit (XU) resource adapter archive (RAR) on WebSphere Application Server and add the properties by which to identify it. The RAR file contains the XU and the persistence layer.

In some cases, because of your application constraints, you might have to deploy the XU inside the application. Choose the appropriate deployment mode of the XU: either embed it into the EAR or deploy it as a global connector. Refer to the application server documentation for instructions on packaging a connector into an EAR. In any case, be aware of the following consequences.
  • When the XU is deployed as a global connector:
    • The deployed Java EE applications might use its third-party libraries (such as ASM) instead of the libraries that are deployed in the application server.
    • Use the parent last setting for the XU Java EE application if your Java EE application does not support the version of the third-party libraries that is distributed with Decision Server. If you cannot use a parent last setting, you might have to embed the XU into the EAR file that executes the rules.
    • If Java security is activated, you might see the following error in the log:

      java.security.AccessControlException: Access denied ("java.util.PropertyPermission" "java.class.path" "read")

      The error can be safely ignored.

  • If you choose an embedded XU packaging, use the parent last setting for the code library if the version of the third-party libraries that are deployed at the level of the application-server code library is not compatible with the XU.
Tip: 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. See Configuring Rule Execution Server in scoped mode.

Procedure

To deploy the XU RAR:

  1. In the WebSphere Integrated Solutions Console, open Resources  > Resource Adapters, and then click Resource Adapters.
  2. In the Resource adapters panel, under Scope, select the Node=xxx, Server=yyy, and then click New.

    xxx is the name of your node and yyy the name of your server.

  3. Click Install RAR.
  4. In the next panel, make sure that Local file system is selected, browse to the resource archive file, and click Next: <ODM_InstallDir>/executionserver/applicationservers/WebSphere85/jrules-res-xu-WAS85.rar
  5. In the General Properties page, enter the XU name.
    1. Set the name for the XU, such as RES XU Resource Adapter.
    2. Select the Isolate this resource provider option.
    3. Click OK.
  6. Back to the Resource adapters page, click Save.
  7. In the next panel, select All scopes from the drop-down list so that the table of resource adapters shows the XU resource that you have just added.
  8. Click the new resource name in the table.

    In this example, you named it RES XU Resource Adapter

    Click the link, do not just select the check box.
  9. In the next panel, under Additional Properties, click J2C connection factories and New.
  10. Enter the following values:
    • Name: xu_cf
    • JNDI name: eis/XUConnectionFactory
      Note: eis/XUConnectionFactory is the predefined JNDI name. If you enter a different one, you must map your user-defined name to the predefined eis/XUConnectionFactory name.
  11. Click OK and Save to save the changes to the master configuration.
  12. Optional: You can define more than one XU resource adapter.

    You need more XU resource adapters when you have more than one node in your environment or you want to isolate the development and testing environments in one single node. You can deploy a JCA resource adapter at any level, depending on the capability of the application server. On WebSphere Application Server, you can install the XU resource adapter at the cell, node, cluster, or server level. But you must install it at the node level before you can deploy it at other levels.

    For example, to define a XU resource adapter on the server level, follow these steps:

    1. In the side panel, open Resources  > Resource Adapters and click Resource adapters, then click Install RAR.
    2. Select the scope Node=xxx, Server=yyy, where xxx is the name of your node, yyy is the name of your server.
    3. Click New and enter the name of the XU as XU.
    4. In Archive Path, select ${CONNECTOR_INSTALL_ROOT}/jrules-res-xu-WAS<version_number>.rar.
    5. Select Isolate this resource provider.
    6. Click OK.
    7. Repeat 5 through 11 to define the connection factory.
  13. Restart the server.
    Tip:

    Whenever you install or uninstall a XU, you must restart your application server.

  14. Optional: If you want to modify the XU properties after deployment:
    1. In the Websphere Integrated Solutions Console, click Resources > Resource adapters > J2C connection factories.
    2. Click the XU connection factory name.
    3. Click Custom properties.
    4. Click the name of the XU property to change.
    5. Modify the value of the XU property.
    6. Click OK.
    7. Save the configuration change.
    8. Restart the server.

What to do next

For more information, especially for instructions about packaging a connector into an EAR or about installing extra XU resource adapters, see the WebSphere Application Server Version 8.5 Information Center.