Databases Reference
In-Depth Information
Handling faults in one-way proxy services
The Service Bus also allows you to define one-way proxy services, where the client
issues a request to the Service Bus and then continues processing without ever
receiving a response. This is often referred to as fire and forget.
The approach for handling errors for one way proxy services is quite different from
that of synchronous services. For transient errors, it makes absolute sense to retry
the business service until we are successful, as no one is going to timeout waiting
for a response.
For permanent errors, we can't return a fault to the client and let them resolve it.
Rather we need to alert a third party so that they can take some corrective steps to
resolve the error, and then re-run the request.
One way to do this is to publish an alert notification to a JMS Queue. We could do
this directly or go via the alerting mechanism, as described earlier. The content of the
alert will typically need to contain details of the actual error so that we know what
corrective action to perform, the proxy service invoked and its payload, so that we
can re-invoke the proxy with the original payload once the issue has been resolved.
Once we've published the alert, we also need to implement something on the other
end of the JMS Queue to process it. One approach would be to implement this
as a BPEL process, containing a human workflow task to correct the error. Once
corrected, the BPEL process could re-invoke the proxy service.
Summary
In this chapter, we've taken a detailed look at some of the key considerations we
need to take into account when handling errors within an SOA-based application.
This includes whether the interaction between the components involved is
synchronous or asynchronous, the error is a business or system error, and whether
it's permanent or transient in nature. In addition, we've examined how the error and
the handling of it are likely to impact other components at different layers within
our composite.
With this is mind, we have outlined an overall approach for handling errors within
our composite applications and how to implement this in composites and the
Service Bus.
 
Search WWH ::




Custom Search