Changing the persistence type by using an Ant task
You can change the persistence type by using the ressetup.xml Ant script.
About this task
The default persistence mechanism of the Rule Execution Server console
is set to datasource in the ra.xml file
of the distribution. When the persistence type is set to file,
the persistence directory is different for rulesets and for Java™ XOM resources, and its path
is relative to the executable file.
- For rulesets, the default persistence directory is res_data.
- For Java XOM resources, the default persistence directory is res_xom.
Important:
- You must not modify the classpath-executionserver.xml file.
- If you choose file persistence on Solaris, your file system must support all the characters that are used in the directory and file names that are present in the ruleset archive (package names and rule names). If your ruleset contains special characters (for example, Chinese or German), your file system must also support these characters. Set the LANG system property to an encoding system that is compatible with your package and rule names, such as en_US.UTF-8.
Procedure
Use the ressetup.xml Ant script to
translate a Java EE artifact
of the Rule Execution Server console
and an execution unit (XU) connector that uses a specific persistence
mode and configuration.
The JAR files and properties for running Rule Execution Server are listed in the <InstallDir>/executionserver/lib/classpath-executionserver.xml file.
Example
The following example creates a management EAR archive that applies file persistence to WebSphere® Application Server 8.5 or 8.5.5:
ant -Dconsole.ear.in=../applicationservers/WebSphere85/jrules-res-management-WAS85.ear
-Dconsole.ear.out=my-jrules-res-management-WAS85.ear
-Dxu.in=../applicationservers/WebSphere85/jrules-res-xu-WAS85.rar
-Dxu.out=my-jrules-res-xu-WAS85.rar
-Dpersistence.type=file -Dpersistence.file.directory=c:/res_data
-Dxom.persistence.type=file -Dxom.persistence.file.directory=c:/res_xom
-f ressetup.xml setup