Filtering on the Client

25-2 Oracle® Fusion Middleware Connectivity and Knowledge Modules Guide for Oracle Data Integrator In the topology, each JMS destination is defined as a JMS XML TopicQueue data server with a single physical schema. A data serverphysical schema pair will be declared for each topic or queue delivering message in the XML format. The structure of the XML message mapped into a relational structure called the XML schema appears as a data model. Each datastore in this model represents a portion typically, an element type in the XML file. Processing Messages As each XML message corresponds to an Oracle Data Integrator model, the entire model must be used and loaded as one single unit when a JMS XML message is consumed or produced. The processing unit for an XML message is the package. It is not possible to declare the properties or header fields of the message in the model or use them as columns in an interface. They still can be used in message selectors, or be set through KM options. Consuming an XML message Processing an incoming XML message is performed in packages as follows: 1. Synchronize the JMS message to the XML schema: This operation reads the message and generates the XML schema. This is usually performed by the first interface accessing the message. 2. Extract the data: A sequence of interfaces use datastores from the XML schema as sources. This data is usable until the session is terminated, another message is read by a new Synchronize action, or the Commit JMS Read is performed. 3. Commit JMS Read: This operation validates the message consumption and deletes the XML schema. It should be performed by the last interface which extracts data from the XML message. Producing an XML message To produce an XML message, a package must be designed to perform the following tasks: 1. Initialize the XML schema: This operation creates an empty XML schema corresponding to the XML message to generate. This operation is usually performed in the first interface loading the structure. 2. Load the data: A sequence of interfaces loads data into the XML schema. 3. Synchronize the XML schema to JMS: This operation converts the XML schema to an XML message, and sends it to the JMS destination. This operation is usually performed by the last interface loading the schema. Filtering Messages It is possible to filter messages from a JMS XML destination by defining a Message Selector MESSAGE_SELECTOR KM option to filter messages on the server. This type of filter can use only the properties or header fields of the message. The filter is Note: This method is extremely similar to XML files processing. In JMS XML, the message payload is the XML file. See Chapter 5, XML Files and Appendix B, Oracle Data Integrator Driver for XML Reference for more information about XML Files processing and the XML Driver.