Details
-
Type:
Task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 4.2.4
-
Fix Version/s: None
-
Component/s: Components
-
Security Level: Public
-
- Environment:
- -
Issue Links
| Depends | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||
Activity
| Field | Original Value | New Value |
|---|---|---|
| Priority | Blocker [ 1 ] | |
| Description |
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: * Fault can only be set by components or SU since they are defined in WSDL and only those are implementing services respecting a WSDL (in the same way that only them can create IN or OUT messages!) * Error can happen everywhere (container, CDK, component, SU) and must be set on the message (some care should be taken to put exception that are classloader-ok, see https://doc.petalslink.com/display/petalscomponents/Advanced+topics+and+guidelines#Advancedtopicsandguidelines-JBIlisteners%2CtheCDKandExceptionhandling . * The SOAP BC should transform Errors to SOAPFaults: see * The CDK: See ticket to be created. |
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: * Fault can only be set by components or SU since they are defined in WSDL and only those are implementing services respecting a WSDL (in the same way that only them can create IN or OUT messages!) * Error can happen everywhere (container, CDK, component, SU) and must be set on the message (some care should be taken to put exception that are classloader-ok, see https://doc.petalslink.com/display/petalscomponents/Advanced+topics+and+guidelines#Advancedtopicsandguidelines-JBIlisteners%2CtheCDKandExceptionhandling . * The SOAP BC should transform Errors to SOAPFaults: see * The CDK should not transform errors to fault: See |
| Assignee | Christophe DENEUX [ cdeneux ] | Victor NOËL [ vnoel ] |
| Link |
This issue depends on |
| Link |
This issue depends on |
| Link |
This issue depends on |
| Status | New [ 10000 ] | Open [ 10002 ] |
| Link |
This issue depends on |
| Fix Version/s | 5.0.0 [ 10412 ] | |
| Priority | Blocker [ 1 ] | Major [ 3 ] |
| Status | Open [ 10002 ] | In Progress [ 10003 ] |
| Link |
This issue depends on |
| Link | This issue depends on PETALSSEACTIVITI-3 [ PETALSSEACTIVITI-3 ] |
| Link |
This issue depends on |
| Link |
This issue depends on |
| Link | This issue depends on PETALSSEACTIVITI-3 [ PETALSSEACTIVITI-3 ] |
| Link |
This issue depends on |
| Link |
This issue depends on |
| Link |
This issue depends on |
| Link | This issue depends on PETALSSEJSR-30 [ PETALSSEJSR-30 ] |
| Link |
This issue depends on |
| Link | This issue depends on PETALSSEACTIVITI-3 [ PETALSSEACTIVITI-3 ] |
| Status | In Progress [ 10003 ] | Resolved [ 10004 ] |
| Resolution | Fixed [ 1 ] |
| Status | Resolved [ 10004 ] | Open [ 10002 ] |
| Resolution | Fixed [ 1 ] | |
| Component/s | Components [ 10270 ] |
| Link |
This issue depends on |
| Fix Version/s | 5.0.0-M1 [ 10412 ] |
| Link |
This issue depends on |
| Transition | Status Change Time | Execution Times | Last Executer | Last Execution Date | |||||||||
|
|
|
|
|
|||||||||
|
|
|
|
|
|||||||||
|
|
|
|
|
|||||||||
|
|
|
|
|
I agree with you, with the following adds: