| ILOG JRules User Guide > Integrating Application Data > Tasks > Using the XML Binding API > Configuring XML Binding > Configuring an XML Data Driver |
Configuring an XML Data Driver |
PREVIOUS NEXT |
You can configure an XML data driving using a configuration file, or using an XML helper. You can also use a resource file to parameterize an XML data driver, and use synchronization to make the data driver multi thread safe.
To configure an XML data driver using a configuration file:
| Note |
| The XML parser property is set using the Java API and not directly in the file. |
The following example shows how to create and configure an XML driver using an XML helper.
To configure an XML data driver using an XML helper:
You can parameterize an XML data driver using a resource file, which consists of named and valued properties.
To parameterize an XML data driver:
ilog.rules.xml.xomMapperClass property. The fully qualified class name of the schema-XOM mapper.
ilog.rules.xml.errorHandlerClass property. The fully qualified class name of the error handler.
ilog.rules.xml.schemaParserClass property. The fully qualified class name of the XML parser class used to parse the XML schema.
ilog.rules.xml.documentParserClass property. The fully qualified class name of the XML parser class used to parse the XML document.
When an XML data driver is created without specifying a resource file, the resource related to its XOM IlrReflect instances is used, if it exists. In this way, any XML data driver may be parameterized through the global engine resource file.
An IlrXmlDefaultDataDriver instance is only multi-thread safe if wrapped by an instance of ilog.rules.xml.util.IlrXmlSynchronizer. The synchronization may also include the XOM by using the class IlrXmlSynchronizer.IlrXmlDataDriver.
To make the XML data driver multi-thread safe:
xomSynchronized parameter of the IlrXmlSynchronizer class to true.
| Note |
| The driver will be multithread safe for these mapping operations if the XOM is accessed independently from the XML driver. |
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |