Petals Distribution

Better management of errors versus faults in JBI exchanges

Details

  • Type: Task Task
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 4.2.4
  • Fix Version/s: None
  • Component/s: Components
  • Security Level: Public
  • Description:
    Hide

    The JBI specs talks of patterns that optionally have faults in them, but it also talk of errors and of error status.
    There is not much explanation about the role of errors, error status and when they can be set on an exchange.

    This ticket clarifies that, and describe what need to be done to improve the code of petals.

    Faults are messages (implementing NormalizedMessage and Fault interfaces).
    FAULT messages are defined in WSDL file in the same ways as OUT or IN messages: they respect an xml schema and that's all.
    When a fault is set on an exchange, the exchange has the status active.

    Errors are java exceptions: they are not defined in the WSDL as they are NOT business related, but technical errors!
    When an error is set on an exchange, the pattern does not continue, the exchange has the status error.

    To clarify, JBI can be partially considered as a WSDL extension: when comparing JBI with SOAP (another WSDL extension), the corresponding concept to JBI Errors are SOAPFault.
    Important: SOAPFault are not ALWAYS WSDL Fault, SOAPFault can represent technical errors (See overview of http://docs.oracle.com/cd/E24329_01/web.1211/e24965/faults.htm for details).
    As a side note, in that context, in the BC SOAP errors must be transformed to SOAPFault (potentially by hiding the stacktrace to hide implementation details!).

    Based on that, the following should be done/respected:

    Show
    The JBI specs talks of patterns that optionally have faults in them, but it also talk of errors and of error status. There is not much explanation about the role of errors, error status and when they can be set on an exchange. This ticket clarifies that, and describe what need to be done to improve the code of petals. Faults are messages (implementing NormalizedMessage and Fault interfaces). FAULT messages are defined in WSDL file in the same ways as OUT or IN messages: they respect an xml schema and that's all. When a fault is set on an exchange, the exchange has the status active. Errors are java exceptions: they are not defined in the WSDL as they are NOT business related, but technical errors! When an error is set on an exchange, the pattern does not continue, the exchange has the status error. To clarify, JBI can be partially considered as a WSDL extension: when comparing JBI with SOAP (another WSDL extension), the corresponding concept to JBI Errors are SOAPFault. Important: SOAPFault are not ALWAYS WSDL Fault, SOAPFault can represent technical errors (See overview of http://docs.oracle.com/cd/E24329_01/web.1211/e24965/faults.htm for details). As a side note, in that context, in the BC SOAP errors must be transformed to SOAPFault (potentially by hiding the stacktrace to hide implementation details!). Based on that, the following should be done/respected:
  • Environment:
    -

Issue Links

People

Dates

  • Created:
    Fri, 24 Apr 2015 - 15:02:00 +0200
    Updated:
    Wed, 28 Dec 2016 - 10:08:14 +0100