Schema Definition File for fault-policies.xml

21-14 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite xs:element name=Properties xs:annotation xs:documentationProperties that can be passes to a custom java classxs:documentation xs:annotation xs:complexType xs:sequence xs:element name=propertySet type=tns:PropertySetType maxOccurs=unbounded xs:sequence xs:complexType xs:element xs:complexType name=PropertySetType xs:sequence xs:element name=property type=tns:PropertyValueType maxOccurs=unbounded xs:sequence xs:attribute name=name type=tns:idType use=required xs:complexType xs:complexType name=PropertyValueType xs:simpleContent xs:extension base=tns:idType xs:attribute name=name type=tns:idType use=required xs:extension xs:simpleContent xs:complexType xs:element name=faultPolicy xs:complexType xs:sequence xs:element ref=tns:Conditions xs:element ref=tns:Actions xs:element ref=tns:Properties minOccurs=0 --Every policy has on Conditions and and one Actions, however, Properties is optional -- xs:sequence xs:attribute name=id type=tns:idType use=required xs:attribute name=version type=xs:string default=2.0.1 xs:complexType xs:key name=UniqueActionId xs:selector xpath=tns:Actionstns:Action xs:field xpath=id xs:key xs:key name=UniquePropertySetId xs:selector xpath=tns:Propertiestns:property_set xs:field xpath=id xs:key xs:keyref name=RetryActionRef refer=tns:UniqueActionId xs:selector xpath=tns:Actionstns:Actiontns:retrytns:retryFailureAction xs:field xpath=ref xs:keyref xs:keyref name=RetrySuccessActionRef refer=tns:UniqueActionId xs:selector xpath=tns:Actionstns:Actiontns:retrytns:retrySuccessAction xs:field xpath=ref xs:keyref xs:keyref name=JavaActionRef refer=tns:UniqueActionId xs:selector xpath=tns:Actionstns:Actiontns:javaActiontns:returnValue xs:field xpath=ref Using Oracle Mediator Error Handling 21-15 xs:keyref xs:keyref name=ConditionActionRef refer=tns:UniqueActionId xs:selector xpath=tns:Conditionstns:faultNametns:conditiontns:action xs:field xpath=ref xs:keyref xs:keyref name=JavaDefaultActionRef refer=tns:UniqueActionId xs:selector xpath=tns:Actionstns:Actiontns:javaAction xs:field xpath=defaultAction xs:keyref xs:keyref name=JavaPropertySetRef refer=tns:UniquePropertySetId xs:selector xpath=tns:Actionstns:Actiontns:javaAction xs:field xpath=property_set xs:keyref xs:element xs:element name=faultPolicies xs:complexType xs:sequence xs:element ref=tns:faultPolicy maxOccurs=unbounded xs:sequence xs:complexType xs:element xs:schema

21.4.2 Schema Definition File for fault-bindings.xml

The fault-bindings.xml file should be based on the XSD file shown in Example 21–17 . Example 21–17 XSD File for fault-bindings.xml ?xml version=1.0 encoding=UTF-8? xs:schema targetNamespace=http:schemas.oracle.combpelfaultpolicy xmlns:tns=http:schemas.oracle.combpelfaultpolicy xmlns:xs=http:www.w3.org2001XMLSchema elementFormDefault=qualified xs:element name=faultPolicyBindings xs:annotation xs:documentationBindings to a specific fault policy xs:documentation xs:annotation xs:complexType xs:sequence xs:element name=composite type=tns:compositeType minOccurs=0 maxOccurs=1 xs:element name=component type=tns:componentType minOccurs=0 maxOccurs=unbounded xs:element name=reference type=tns:referenceType minOccurs=0 maxOccurs=unbounded xs:sequence xs:attribute name=version type=xs:string default=2.0.1 xs:complexType xs:key name=UniquePartnerLinkName xs:selector xpath=tns:referencetns:name xs:field xpath=. xs:key xs:key name=UniquePortType xs:selector xpath=tns:referencetns:portType xs:field xpath=. xs:key xs:key name=UniquePolicyName 21-16 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite xs:selector xpath=tns:reference xs:field xpath=faultPolicy xs:key xs:element xs:simpleType name=nameType xs:restriction base=xs:string xs:minLength value=1 xs:restriction xs:simpleType xs:complexType name=propertyType xs:simpleContent xs:extension base=tns:nameType xs:attribute name=name type=xs:string use=required fixed=faultPolicy xs:extension xs:simpleContent xs:complexType xs:complexType name=referenceType xs:annotation xs:documentationBindings for a partner link. Overrides composite level binding.xs:documentation xs:annotation xs:sequence xs:annotation xs:documentationSpecification at partner link name overrides specification for a port typexs:documentation xs:annotation xs:element name=name type=tns:nameType minOccurs=0 maxOccurs=unbounded xs:element name=portType type=xs:QName minOccurs=0 maxOccurs=unbounded xs:sequence xs:attribute name=faultPolicy type=tns:nameType use=required xs:complexType xs:complexType name=componentType xs:annotation xs:documentationBinding for a component xs:documentation xs:annotation xs:sequence xs:element name=name type=tns:nameType minOccurs=0 maxOccurs=unbounded xs:sequence xs:attribute name=faultPolicy type=tns:nameType use=required xs:complexType xs:complexType name=compositeType xs:annotation xs:documentationBinding for the entire compositexs:documentation xs:annotation xs:attribute name=faultPolicy type=tns:nameType use=required xs:complexType xs:schema 22 Resequencing in Oracle Mediator 22-1 22 Resequencing in Oracle Mediator This chapter describes support for message resequencing in Oracle Mediator. It contains the following sections: ■ Section 22.1, Introduction to the Resequencer ■ Section 22.2, Resequencing Order ■ Section 22.3, Configuring the Resequencer ■ Section 22.4, Limitations in the Resequencer

22.1 Introduction to the Resequencer

The resequencer in Oracle Mediator rearranges a stream of related but out-of-sequence messages into a sequential order. When incoming messages arrive, they may be in a random order. The resequencer orders the messages based on sequential or chronological information, and then sends the message to the target services in an orderly manner. The sequencing is performed based on the sequencing strategy selected.

22.1.1 Groups and Sequence IDs

The resequencer works with two central concepts: groups and sequence IDs. The sequence ID is an identifying part of the message, and messages are rearranged based on this identifier. The messages arriving for resequencing are split into groups and the messages within a group are sequenced according to the sequence ID. Sequencing within a group is independent of the sequencing of messages in any other group. Groups in themselves are not dependent on each other and can be processed independently of each other. As an example, messages attached to certain groups arrive to an Oracle Mediator service component in the following order: msg9a, msg8b, msg7a, msg6c, msg5a, msg4b, msg3c, msg2b, msg1a Table 22–1 shows how the Oracle Mediator sorts the messages into groups. The order of the messages in each group depends on the type of resequencer used. Table 22–1 Messages Sorted into Groups Group c Group b Group a msg6c, msg3c msg8b, msg4b, msg2b msg9a, msg7a, msg5a, msg1a 22-2 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite All the groups are processed independently of each other and any error occurring in ones group does not affect the processing of other groups.

22.1.2 Identification of Groups and Sequence IDs

Groups and sequence IDs are identified through XPath expressions in the payload. You specify XPath expressions that point to the elements in the message payload on which grouping is done and on which sequencing is done. In the message payload shown in Figure 22–1 , CustomerId is the field on which to base instance sequencing and CustomerName is the field on which to base grouping. Figure 22–1 Message Payload

22.2 Resequencing Order

Oracle Mediator can resequence the incoming messages in a user-specified order. This implementation enables you to specify three types of resequencing orders: ■ Standard Resequencer ■ FIFO Resequencer ■ Best Effort Resequencer Note: Resequencing is supported only for Oracle Mediator components that have a request operation and a request-callback operation in the WSDL file. In other words, resequencing is not allowed by the user interface if the WSDL operation has a synchronous reply element. For more information about these operations, see Chapter 23, Understanding Message Exchange Patterns of an Oracle Mediator.