Asynchronous SCA One-Way Operations And How To Recover

From DeveloperWorks, comes the succinctly titled: <deep breath> Recovering from failed asynchronous SCA service invocations on WebSphere Process Server article

Imagine this common scenario. You have a mission-critical Service Component Architecture (SCA) application running on IBM® WebSphere® Process Server. A message is sent to this application to invoke an asynchronous service, however, service invocation fails. What happens to the original message? What new messages are sent? How can the system recover from the failure? This article describes potential message routes and recovery scenarios. It explains how to configure the system to set up recovery, and it covers a wide range of SCA messaging options, including both WebSphere Default Messaging (JMS provider) and WebSphere MQ.

Allow me to decipher this into lay mans terms. “What happens when I invoke a one-way operation and it fails?”. Think about it. The caller is following the ‘fire and forget’ pattern. It’s already moved on to running the next block of code, so it can’t handle the exception. The callee can’t deal with the message. We can’t just throw it away or else they would just call it the ‘fire and pray’ pattern since you aren’t even guaranteed the message made it to the endpoint. Process Server could just route it into a dead letter queue like MQ does, but now our user who operates in the abstracted J2EE world of WID needs to write code to browse queues and re-submit messages.

No. What Process Server does is provide a UI called the “Failed Event Manager”. It’s present on all WPS servers ( http://hostname:9080/FailedEvents ) and allows you to browse the exception information, edit the business object and even re-submit the message to the point of failure. A Failed Event manager message is created by putting a message into the special failed event queue (this is done automatically by process server SIBus queues). The FEM MDB will pick up the event and create the appropriate entries.

For a more generic understanding of failed events of types other than JMS, check out:
Exception handling in WebSphere Process Server and WebSphere Enterprise Service Bus, an indepth article on all the ways exception can occur and how the server handled them.

Author: dan

Comments

  1. Hello, Dan.
    Did you tried to make this faults by your won application? I mean – is it possible to throw my own exceptions wrapped by servicebusinnesexception so that messages throws in FEM?

    Pardon my French =)

Leave a Reply

Your email address will not be published. Required fields are marked *