| ILOG JRules User Guide > Optimizing Execution > Tasks > Setting Rule Engine Configuration Properties > Calling a Custom Configuration Resource File |
Calling a Custom Configuration Resource File |
PREVIOUS NEXT |
You can manage engine configuration through the API class IlrResources. An instance of this class contains the configuration properties and their associated values.
When an IlrDynamicObjectModel object is created, it points to a resource bundle. This resource bundle, which is an instance of IlrResources, contains a number of configuration properties. When the IlrDynamicObjectModel is an IlrReflect object, IlrReflect being a subclass of IlrDynamicObjectModel, the resource bundle is used to configure the creation of rule engines.
Engine configuration files need to be loaded before the IlrReflect object is used to create the rule engines. The methods defined in IlrResources are used to load the files as shown below.
When anIlrReflect object is created to create the rule engine, it creates a new IlrResources object. You can set an alternative class loader on the IlrResources object to find your custom configuration resource file. To get and set the configuration resource file, use the following methods:
class IlrDynamicObjectModel
{
IlrResources getResources() {...};
void setResources(IlrResources res) {...};
};
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |