InOut Pattern: How to retriver an exception to the Consumer
When an exception is caught into the Provider side during an InOut exchange...you can't retrieve the message exchange under JBI error status, because the JBI specification doesn't allow to use the Status (DONE or ERROR) to communicate.
So we've got only one solution :convert the exception to a JBI Fault, and retrieve a JBI Fault embedding the original exception. Now, how to implements this correction?
Sol1-Each component MUST convert internally all its exceptions to a Fault when it's under the Provider role with an InOut Pattern
Sol2-The MessageExchangeProcessor (into the kernel) transforms all the Exchange on ERROR status to ACTIVE status with a JBI Fault when the Pattern is InOut. So, the comportment is general to all the exchanges.
Sol3-Another actor transforms the Exchange (who?)
Today, I want to implement the sol2...but what do you think about?
maybe a low level problem could be a PEtALSException (throwable at any step on a sequence, on any JBI MEP), and an external exception or a pure component exception could be a standardyze JBIException...throwable only when the MEP allows it at the current state...