Chapter 13. Adapter design and environment 199
2. Programming language:
Application written in Java
3. Application execution architecture:
Multi-threaded application using an RMI communications mechanism for
connectivity
4. Database Type:
IBM DB2® UDB
Relational
5. Distributed application:
Is the application distributed across multiple servers?
Potentially, it will in the future. Currently, it does not.
Is the application database distributed across multiple servers?
Potentially, it will in the future. Currently, it does not.
Early in the project planning phase, we need to determine what roles the
connector will perform for the application:
Request processing
Update application data at the request of an integration broker.
Event notification
Detect application events and send notification of events to the integration
broker.
To be bidirectional, the connector needs to support both event notification and
request processing. Our application does.
13.3 Examining the API
Ideally, an application provides an API that includes all of the following features:
Support for CRUD operations at the object level
Encapsulation of all of the application business logic
Support for delta and after-image operations
The recommended approach to connector development is to use the API that the
application provides. The use of an API helps ensure that connector interactions
with the application abide by application business logic. In particular, a high-level
API is usually designed to include support for the business logic in the
application. A low-level API might bypass application business logic.
200 WebSphere Business Integration Adapters
As an example, a high-level API call to create a new record in a database table
might evaluate the input data against a range of values, or it might update
several associated tables as well as the specified table. Using SQL statements to
write directly to the database, on the other hand, might bypass the data
evaluation and related table updates performed by an API.
If no API is provided, the application might allow its clients to access its database
directly using SQL statements. If you use SQL statements to update application
data, work closely with someone who knows the application well so that you can
be sure that your connector will not bypass application business logic. This
aspect of the application has a major impact on connector design because it
affects the amount of coding that the connector requires. The easiest application
for connector development is one that interacts with its database through a
high-level API. If the application provides a low-level API or has no API, the
connector will probably require more coding.
The following questions to ask about the API can help you decide if it is a good
candidate for an adapter:
1. Is there an existing mechanism that the connector can use to communicate
with the application?
Ye s
2. Does the API allow access for CRUD operations?
Ye s :
Create, Retrieve, and Update are possible.
–Delete.
There is no physical delete. A delete request would result in the status of
cancelled or deleted only.
3. Does the API provide access to all attributes of a data entity?
No, some data entities are internal to the application.
4. Are there inconsistencies in the API implementation?
No
5. Is the navigation to the CRUD functions the same regardless of the entity?
Ye s
6. Describe the transaction behavior of the API.
Each Create, Update, or Delete operation operates within its own
transactional unit.
7. Does the API allow access to the application for event detection?
Ye s

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.