To have Decision Warehouse use a new data source, you must
first configure the calling client application to this effect.
About this task
Because Decision Warehouse can use multiple data sources,
for Decision Warehouse to use a new data source that you select, you
must first configure the calling client application in the default-dvs-dw.properties file.
For more information about multiple data sources, see Overview: Multiple data sources in Decision Warehouse.
Procedure
To configure the client application:
- In the <InstallDir>/executionserver/lib/jrules-res-session-java.jar archive,
open the properties file named default-dvs-dw.properties.
- Change the following line to specify a configured data
source:
JNDI_NAME=jdbc/AnotherResDatasource
Note: You
can also change the default Decision Warehouse persistence mechanism
in that file by specifying your own implementation of IlrTraceDAOFactory.
Access the execution traces and the rule execution result with the Decision Warehouse extension
API. Use the IlrTraceDAO.saveTrace to write data to a specific database.
For more information about the Decision Warehouse APIs, see the Rule Execution Server API section
in Rule Execution Server reference.
- Add the resource reference to the deployment descriptor:
-
In the descriptor of your web application client if you use IlrJ2SESessionFactory, or IlrPOJOSessionFactory
-
<resource-ref>
<res-ref-name>jdbc/AnotherResDatasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
- Save the file as dvs-dw.properties.
- Reference the file dvs-dw.properties and
the trace DAO classes in each application class path.