beautypg.com

Problem determination, Fault handling support – IBM WebSphere Adapters User Manual

Page 174

background image

v

When WBIStructuredRecord is initialized with data that contains Bidi
annotations, Cursors and accessors that are associated with that structured
record will automatically translate the content into or from the Bidi format
specified in the annotations, via special cursors and accessors that wrap the
versions provided by the data exchange factory .

Problem determination

You can implement messages to accompany a range events.

Fault handling support

Through enhancements to the Service Component Architecture (SCA) and the
Adapter Foundation Classes (AFC), the WebSphere Adapter Toolkit provides fault
handling support. Fault handling allows the developer to differentiate information
technology (IT) exceptions from business processing exceptions during outbound
processing.

A fault is an exception condition that alters the normal flow of a business process.
Typically, a fault represents a predictable error that has a well-defined action.
Presenting errors as faults instead of exceptions makes it easier for you to
configure recovery processing, because fault handling does not require you to write
Java code to catch and handle an exception. Adapters created with the WebSphere
Adapter Toolkit generate several faults.

Fault handling support adheres to the DataBinding model, in that when an
exception is thrown by an adapter, a fault selector determines that it is a fault and
the fault (data) binding converts the exception to a fault business object and
returns it to the server runtime.

Fault artifacts:

To facilitate fault handling support, WebSphere Adapter Toolkit provides artifacts
that include fault classes, fault business objects, a fault selector, and a fault binding
class.

The following table shows AFC fault classes, corresponding fault business names
and fault type names. The configured fault binding and a descriptive example of
each fault can be found in the section about configuration for fault handling.

Fault Exception in AFC

Corresponding Fault Name

Corresponding Fault Type Name

DuplicateRecordException

DUPLICATE_RECORD

DuplicateRecordFault

InvalidRequestException

INVALID_REQUEST

InvalidRequestFault

MatchesExceededLimitException

MATCHES_EXCEEDED_LIMIT

MatchesExceededLimitFault

MissingDataException

MISSING_DATA

MissingDataFault

MultipleMatchingRecordsException MULTIPLE_MATCHING_RECORDS

MultipleMatchingRecordsFault

RecordNotFoundException

RECORD_NOT_FOUND

RecordNotFoundFault

In addition to the fault classes, the following fault selector class and base fault
binding class are provided:

v

WBIFaultSelectorImpl

v

WBIFaultDataBindingImpl

A utility class named FaultBOUtil can help you define simple custom fault
business objects.

168

WebSphere Adapters: WebSphere Adapter Toolkit User Guide