IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit
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.
When you enable inbound callback event notification, business processes are alerted to changes in, or new information about, an EIS. The phrase callback refers to the ability of the EIS system to directly notify the adapter or business processes of a change, as opposed to the polling mechanism used in event notification.
Callback event notification complements outbound request processing, enabling adapters to provide bidirectional communication between business processes and EIS applications.
Generally, in a callback scenario, the adapter will need to setup event listeners to receive callback events from the EIS. Callback event processing could be either synchronous (REQUEST-RESPONSE) or asynchronous (ONE-WAY).
- Request and response callback events
A request and response callback event is a synchronous operation in which the EIS sends a callback call to the adapter and waits for the adapter to respond to the call.- One-way callback events
One-way callback events are asynchronous operations in which the EIS sends an event to the adapter and then goes on with its processing, not waiting for the adapter to send a response back.- Use the IBM WebSphere adapter foundation classes for inbound callback event processing
The adapter foundation classes can automatically track endpoints (the consumers of events) for the adapter, control the event pickup and delivery of events, handle recovery of events if the adapter unexpectedly terminates, and assure once-and-only-once event delivery.- Callback event sender
CallbackEventSender in com.ibm.j2ca.extension.eventmanagement.external package provides four public methods.- Callback event processing for basic delivery
When the event is created at the EIS end, configured adapterListener gets notified and it in turn instantiates CallbackEventSender. Here adapterListener decides which method to invoke out of the four defined.- Callback event processing for event delivery with XA transaction
To provide data integrity and to make sure events are not delivered more than once, which would cause errors in the downstream system in the integration scenario, the invention provides a mechanism to achieve once-and-only delivery and the same is accomplished using XA transaction.- Callback event processing for event recovery
When there is a failure in the event processing as part of system recovery, the adapter is able to recover the unprocessed events by implementing the once-one-only delivery mechanism.