Setting up the Java EE rule session sample

You must install this sample before you can run it.

Before you begin

If you do not use the sample server but use another supported application server, configure the sample property files build.properties and jndi.properties as indicated in the following table.
Application server Configuration
WebSphere® Application Server

<InstallDir>/executionserver/samples/j2eerulesession/websphere<version_number>/jndi.properties: java.naming.provider.url=corbaloc:iiop:localhost:<Port>

This parameter defines the URL to the computer that runs the JNDI service.

WebLogic Server 10 and 12c

<InstallDir>/executionserver/samples/j2eerulesession/weblogic<version_number>/build.properties:

WL_HOME=${env.WL_HOME}

By default, the variable is set to your WL_HOME environment variable.

<InstallDir>/executionserver/samples/j2eerulesession/weblogic<version_number>/jndi.properties:

java.naming.provider.url=<JNDIService>
This parameter defines the URL of the computer that runs the JNDI service. For example:
java.naming.provider.url=t3://localhost:7001/
Tomcat 7

<InstallDir>/executionserver/samples/j2eerulesession/tomcat7/build.properties:

TOMCAT_HOME=${env.TOMCAT_HOME}

By default, the variable is set to your TOMCAT_HOME environment variable.

Procedure

  1. Start the samples console from the applications menu of your system: select IBM > package_group > Sample Server > Samples Console.

    The package_group placeholder refers to the package group that you specified when you installed the product. The default package group is Operational Decision Manager V8.5.

  2. Start your application server.

    If you are working with the sample server, click the appropriate link in the Sample Server tab of the samples console.

  3. In the Samples Commands tab, navigate to Samples Commands > Rule Execution Server > Java EE rule session > application_server.
    Tip: You can also click View sample commands from the Samples and Tutorials tab.
  4. Build the XOM classes and package the associated files as follows:
    • For Tomcat, double-click the war command. This command builds the XOM classes and packages the following files: the Web Archive Resource (WAR) including the JavaServer Pages (JSP) and the libraries for ruleset execution.
    • For the sample server and the other supported application servers, double-click the ear command. This command builds the XOM classes and packages the following files: the Web Archive Resource (WAR) including the JavaServer Pages, the rule session Java™ Archive Resources (.jar files), and the Enterprise Archive Resource (.ear files).
    Note:
    • When you deploy the sample on WebSphere Application Server 8.5 or 8.0, or on WebLogic Server 10 or 12c, the sample uses EJB3.
    • On Tomcat, the sample uses a Java SE rule session. For application servers that support EJBs, the Java client connects to the remote EJB rule session, executes the rules, and displays the output.
  5. Deploy the sample in one of the following ways:
    • On the sample server, expand Samples Commands > Rule Execution Server > Java EE rule session and double-click the deploy command.
    • On the other supported application servers, deploy the EAR file as described in your application server documentation. Make sure that the user is added to the appropriate group.