Oracle SOA Suite Fault Handling Best Practices.
1. Create fault (catch block) for each partner link. For each partner link, have a catch block for all possible errors. Idea is not to let errors go to catchAll block.
2. CatchAll should be kept for all errors that cannot be thought of during design time.
3. Classify errors into various types – runtime, remote, binding, validation, Business errors etc.
5. Use Catch Block for non-partner link error.
6. Every retry defined in fault policy causes a commit of the transaction. Dehydration will be reached and threads released.
8. Handle Rollback fault by providing ‘No Action’ in fault policy.
9. Remember – Receive, OnMessage, On Alarm, Wait, CheckPoint (Activity for forcing Java thread to store its current state to Dehydration store) will cause storing of current state to dehydration store and threads will be released.
10. Always use MDS to store fault policies and bindings to increase their reuse for multiple composites and projects.
Important points while handling error
• If the error occurred in synchronous need to return minimum error information like error code, description and message id
• If the services are more alike Asynchronous then we need to have common error logging/audit framework which will receive errors through DB or JMS ,Based on error types we can notify or persist the error
• Fault context variable is available only in error handler.
• While designing fault schema object consider the below important points
• Error Code
• Error Description
• Error Reference (i.e. Service Name and Which operation)
• Instance Id (This information you can get inbuilt function fn:uuid)
• Error Type (System Error or Business Error)
• Error Notification
No comments:
Post a Comment