90 WebSphere Business Integration Adapters
8.1 Overview of event notification
The ways in which application-specific components detect and retrieve events
differ from one adapter to another. However, the way in which
application-specific components send events to the Adapter Framework and the
way in which the Adapter Framework delivers those events to the integration
broker is standard across all adapters.
When an event occurs in an application, the connector application-specific
component processes the event, retrieves related application data, and returns
the data to the integration broker in a business object. The following steps outline
the tasks of an event-notification mechanism:
1. An application performs an event and puts an event record into the event
store. The
event store is a persistent cache in the application where event
records are saved until the connector can process them. The event record
contains information about the change to an event store in the application.
This information includes the data that has been created or changed, as well
as the operation (such as create, delete, or update) that has been performed
on the data.
2. The connector’s application-specific component monitors the event store,
usually through a polling mechanism, to check for incoming events. When it
finds an event, it retrieves its event record from the event store and converts it
into an application-specific business object with a verb.
3. Before sending the business object to the integration broker, the
application-specific component can verify that the integration broker is
interested in receiving the business object.
If you use WebSphere InterChange Server as the business integration
system, the Adapter Framework does not assume that the integration broker
is always interested in every supported business object. At initialization, the
Adapter Framework requests its subscription list from the Connector
Controller. At run-time, the application-specific component can query the
Adapter Framework to verify that some collaboration subscribes to a
particular business object. The application-specific connector component can
send the event only if some collaboration is currently subscribed. The
application-specific component sends the event, in the form of a business
object and a verb, to the Adapter Framework, which in turn sends it to the
Connector Controller within InterChange Server.
However, if you use the Message Broker or WebSphere Application Server
(Server Foundation) as the business integration system, the Adapter
Framework assumes that the integration broker is interested in all the
connector’s supported business objects. If the application-specific connector
component queries the Adapter Framework to verify whether to send the
Chapter 8. Asynchronous event processing and notification 91
business object, it will receive a confirmation for every business object that
the connector supports.
4. If the integration broker is interested in the business object, the connector
application-specific component sends the event, in the form of a business
object and a verb, to the Adapter Framework, which in turn sends it to the
integration broker.
The implementation of an event-notification mechanism is a three-stage process:
1. Create an event store that the application uses to hold notifications of events
that have changed application business entities.
2. Implement an event detection mechanism within the application. Event
detection notices a change in an application entity and writes an event record
containing information about the change to an event store in the application.
3. Implement an event retrieval mechanism (such as a polling mechanism)
within the connector to retrieve events from the event store and take the
appropriate action to notify other applications.
Figure 8-1 illustrates the components of the event-notification mechanism. In
event notification, the flow of information is from the application to the connector
and then to the integration broker.
Figure 8-1 Event detection and retrieval mechanism
In many cases, an application must be configured or modified before the
connector can use the event-notification mechanism. Typically, this application
configuration occurs as part of the installation of the connector’s
application-specific component. Modifications to the application might include
setting up a user account in the application, creating an event store and event
Event
Record
Event
Event
Retrieval
User
Action
Application
Entity
Application
Connector
Framework
Event
Store
Integration
Broker
Event
Detection
Information Flow

Get WebSphere Business Integration Adapters: An Adapter Development and WebSphere Business Integration Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.