I am writing this post as it may help others who have missed the oracle documentation on rejection handlers.
Whenever a polling inbound adapter (DBAdapter,File Adapter) fails after a specified number of retires the message is then moved to the specified rejection handler. The message can be later handled according to the business requirement.
Rejection Handler:
The rejection handlers can be a
By default if a rejection handler is not configured a file-based rejection handler kicks in.
The messages are found at the below locations based on BPEL/OSB being used
Whenever a polling inbound adapter (DBAdapter,File Adapter) fails after a specified number of retires the message is then moved to the specified rejection handler. The message can be later handled according to the business requirement.
Rejection Handler:
The rejection handlers can be a
-
Web Service Handler
-
Custom Java Handler
-
JMS Queue
-
File (Default)
The rejected messages can be viewed by two ways
- Querying the DEV_SOA_INFRA
select * from rejected_message- Looking at the console for rejected messages
You can view the rejected messages in the Recent Faults and Rejected Messages section of the Dashboard tab or in the Faults and Rejected Messages tab.
By default if a rejection handler is not configured a file-based rejection handler kicks in.
The messages are found at the below locations based on BPEL/OSB being used
FOR OSB <domain_home>/jca/receive/rejectedMessages.- For bpel the path is
<domain_home>/rejmsgs/<wls_server_name>/<composite_name>
rejected_message
table) by default. Currently, the Oracle SOA suite does
not provide the capability to resubmit rejected messages; consequently
it is your responsibility to take care of the resubmissionConfiguring rejection handler in BPEL
This is a sample faultpolicies.xml which can be used to configure the rejection handler folder in BPEL process. For more information on fault handling in bpel refer to other blog postsConfiguring rejection handler in OSB
If you want to configure rejected message folder in OSB use the "rejectedMessageHandlers" property as dynamic endpoint property in the jca transport as shown below
Please note that you can only configure directory in osb and configuring file name is not available .
These are the following steps
- Navigate to the inbound proxy service that does the polling
- Select the jca transport tab
-
Scroll down to dynamic end point properties -
Enter property name rejectedMessageHandlers and value as file://<dirpath> (The dirpath should be the path on the server)
- Click + symbol on the actions tab and deploy it to the server
Now you should be able to see the rejected messages in the directory specified if they get rejected.