Checking from the Database

ADAPTER Life-Cycle Management 2-33 If the message cannot be delivered to Q1 or to any one of the queues but the message is delivered to queues Q2 and Q3, the transaction must roll back all the three messages because all are XA resources and there is an exception in one of XA unit. The rollback exception is thrown only for the second composite where Q1 failed, and the transactions commits Q2 and Q3 instead of rolling back the messages for all the three queues. To have the transaction roll back all the queues even if only one fails, and for the other two have messages successfully delivered to them, you must make the change in the composite.xml file of the called composite Composite2 as Example 2–4 shows: Example 2–4 Changes in composite.xml of Composite2 component name=BPELProcess1 implementation.bpel src=BPELProcess1.bpel property name=bpel.config.transactionrequiredproperty component This sets the property bpel.config.transaction to the value of required, which causes the transaction to roll back all the queues even if only one fails. Note that if you set property bpel.config.transaction to a value of required, the Oracle BPEL engine effectively processes the synchronous request without creating a new transaction; rather, it uses the callers transaction. Therefore, if at any point the transaction gets rolled back, nothing done in that transaction will commit.

2.22.2 Inbound Interaction Error Handling

You can indicate the way inbound adapters should handle errors by specifying rejected message handlers.

2.22.2.1 Message Error Rejection Handlers

You can create rejection handlers to handle message errors. Message errors include those that occur during translation, correlation ID mismatch and XML parsing after message reception.

2.22.2.1.1 Available Rejection Handlers for Message Errors

Before considering error handling in terms of retryability, it is important to understand the error handlers that are available. The following are the system-defined error handlers, which you can configure via fault policies:. ■ Web Service Handler ■ Custom Java Handler ■ JMS Queue ■ File

2.22.2.1.2 Web Service Handler

A rejected message can be handled by calling a Web Service. If you choose to use a Web Service to handle these errors, you should implement a predefined WSDL interface implemented by the target service, SOAP bindings for the Web service invocaiton, and native payloads passed as WebService-attachments, as shown in the following example: Action id=ora-ws