IBM WebSphere Adapters Network Card User Manual


 
Function selector:
Function selectors map resource adapter events to corresponding SCA export
function names.
The WebSphere Adapter component that exposes resource adapters as SCA
components requires what is known as a function selector. This selector maps
events generated by resource adapters to a SCA export function name. For
example, an adapter may generate an after-image Customer event with top-level
verb Update, which the user expects to be published using the function
emitCreateAfterImageCustomer.
public interface FunctionSelector {
public String generateFunctionName(Object[] argObjects) throws MetadataException;
}
The StructuredDataFunctionSelector class looks at metadata within the
StructuredRecord to generate a function name. It will create a function name as
follows emit[OperationName]AfterImage[RecordName], where OperationName is
an operation stored in the record as the operationName property, and RecordName
is the value stored in the recordName property.
For more information on the FunctionSelector interface, see the Metadata
Discovery Specification.
For example, if the StructuredDataFunctionSelector received an event such as
CustomerBG with TopLevelVerb Create and containing a business object of type
Customer, the WBIFunctionSelector class would generate a function name such as
emitCreateAfterImageCustomer. For the same business graph with no
TopLevelVerb, the function name emitted might be emitDeltaCustomer.
Error handling for events:
Event error handling depends on the delivery type and the kind of endpoint
involved.
If the endpoint throws an exception during delivery, the event manager will stop
delivering events to that endpoint, and the timer task for polling stops. If the
delivery type is ORDERED, the remaining events polled in that cycle are not
delivered until the event with the error is processed. If the delivery type is
UNORDERED, the event manager attempts to deliver the remaining events in the
current poll cycle. When the endpoint is taken offline and reactivated, the event(s)
in which the error occurred is re-delivered, and normal delivery of subsequent
events resumes. If the endpoint is transactional and the transaction rolls back, the
event manager responds as if the endpoint threw an exception.
If the implementation throws an exception during the getObjectForEvent call (for
retrieval of the full event), the event manager marks the status of that event in the
event table asERROR_PROCESSING_EVENT. If the delivery type is ORDERED, the
polling task stops until the endpoint is reactivated. If the delivery type is
UNORDERED, the polling task continues.
Inbound callback event notification
An EIS application’s capability to call the adapter directly, by registering a listener,
is known as a callback. If your application supports the callback capability, you can
make use of callback event notification support in the adapter foundation classes.
WebSphere Adapter development overview 89