Configuring the Rule Execution Server console

To have Decision Warehouse use a new data source, you must also configure the Rule Execution Server console so that users can select the new data source.

Procedure

To configure the Rule Execution Server console for a new data source:

  1. Open the web.xml file from the Rule Execution Server console archive.

    For Java™ EE archives, extract the WAR file from jrules-res-management-<applicationserver>.ear.

  2. Add a reference to the IlrTraceDAOFactory interface. To do so:
    1. Update the entry in Decision Warehouse configurations available in the Rule Execution Server console by adding an entry to the web.xml file to declare the data source configuration.

      You must declare a <context-param> block with the name of the configuration in the web.xml file for each Decision Warehouse configuration. The <param-value> statement is a string that begins with factoryClassname=FULLY_QUALIFIED_NAME_OF_THE_TRACE_DAO_FACTORY_FOR_THE_CONFIGURATION, followed by a semi-colon (;) and, optionally, a list of properties with which to initialize the TraceDAO factory.

      Separate each property by a semi-colon (;) and define the property as:

      PROPERTY_NAME=PROPERTY_VALUE

      Separate the list of configuration names by a comma (,). For example:

      <context-param>
         <param-name>ilog.rules.res.trace.DECISIONWAREHOUSE_CONFIGURATIONS</param-name>
         <param-value>dwConfigurationWithCustomTraceDAOFactory,customDWConfiguration</param-value>
      </context-param>
      <context-param>
         <description>A Decision Warehouse configuration that uses a custom trace DAO factory implementation that needs two properties initialized: FILE_NAME and MAX_SIZE</description>
         <param-name>dwConfigurationWithCustomTraceDAOFactory</param-name>
         <param-value>factoryClassname=com.me.IlrFileTraceDAOFactory;FILE_NAME=database.bin;MAX_SIZE=1G</param-value>
      </context-param>
      <context-param>
         <description>Custom Decision Warehouse configuration</description>
         <param-name>customDWConfiguration</param-name>
         <param-value>factoryClassname=ilog.rules.res.persistence.impl.jdbc.IlrDatasourceTraceDAOFactory;
         JNDI_NAME=jdbc/My_DW_datasource</param-value>
      </context-param>
    2. Save the web.xml file.
    3. Repackage the WAR with the DAO class.
    4. Redeploy the WAR.
  3. Set the factoryClassname property to a custom IlrTraceDAOFactory implementation or to the IlrDatasourceTraceDAOFactory Decision Warehouse parameter and use a different JNDI name for your new data source.

    See the Sample: Decision Warehouse customization for an example of a customized implementation of IlrTraceDAOFactory.