Setting up the Java EE rule session sample

You use the Samples Console to install the sample.

Before you begin

If you use a supported application server other than the provided sample server, configure the sample property files build.properties and jndi.properties as shown in the following table.
Application server Configuration
WebSphere® Application Server
<InstallDir>/executionserver/samples/j2eerulesession/websphere<version_number>/build.properties:
WAS_HOME=${env.WAS_HOME}
server.host=localhost
server.port=9080

By default, the variable WAS_HOME is set to your WAS_HOME environment variable, server.host to localhost, and server.port to 9080. Check the variables and update them if necessary.

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

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

WebLogic Server 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

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

TOMCAT_HOME=${env.TOMCAT_HOME} 

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

Procedure

  1. In the Start menu of your computer, click All Programs > package_group > Sample Server > Samples Console to start the Samples Console.

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

  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 the sample server or Tomcat, double-click the war command. This command builds the XOM classes and packages the following files: the Web Archive Resource (WAR) with the JavaServer Pages (JSP), and the libraries for ruleset execution.
    • For the other supported application servers, double-click the ear command. This command builds the XOM classes and packages the following files: ruleset archive (.dsar files), the WAR with the JSP, 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, or on WebLogic Server, 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, runs 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.