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 > JDBC > Overview of IBM WebSphere Adapter for JDBC
Technical overview
The adapter supports integration of databases that are accessible through the JDBC application programming interface (API) with applications running on IBM BPM or WebSphere Enterprise Service Bus. The adapter provides outbound and inbound processing under the Java™ Platform, Enterprise Edition (JEE) Connector Architecture (JCA) and integrates with Service Component Architecture components.
Outbound processing enables an application to access or modify data in a database. The adapter converts a request from the application to an outbound operation, which it runs to create, retrieve, update, or delete data in the database or to run a database program stored in the database. Processing these requests results in the creation, retrieval, update, or deletion of rows in the corresponding database tables. The adapter also enables you to run stored procedures or stored functions defined in the database, and to run user-defined SELECT, INSERT, UPDATE, and DELETE statements.
You can use the adapter to integrate multiple applications with the same database.
Figure 1 presents an overview of the flow of outbound processing.
An application running in IBM BPM or WebSphere Enterprise Service Bus invokes a service in an outbound module, which sends a request to the adapter to process one or more business objects. The adapter uses the JDBC API to connect to the database server, which accesses the tables and other objects in the database.
Figure 1. Processing outbound requests
Inbound processing enables an application to receive notification when objects in the database are changed.
For example, an application can be notified when rows are created, updated, or deleted in selected database tables.
Figure 2 presents an overview of the flow of inbound processing.
A database application changes tables in the database. The change causes a trigger, or another automated mechanism, to update the event store with information about the change. Periodically, the adapter polls the event store, retrieves, and processes events, and then delivers them to the export of a module that is part of an application that runs in IBM BPM or WebSphere Enterprise Service Bus.
Figure 2. Processing inbound events
The adapter can process events in one of the following ways:
- Standard event processing, using an event store that is populated by the database application
- Custom event processing, using a user-defined database query
During standard event processing, when data is changed in the tables in the database, appropriate events are inserted into a database table called an event store, along with relevant information, such as key values. To capture the changed data, you can place triggers on the respective tables, or use other methods such as Oracle Change Data Capture, which is provided for Oracle databases. The adapter polls the event store and retrieves a batch of events. The events can be filtered by business object type and time stamp and connector ID. The adapter uses each event to construct a business graph or business object that contains the business objects changed by that event. The business object or business graph is then dispatched to the exports that are configured to receive the specific business object.
During custom event processing, the adapter runs a query specified by the user as a standard SQL statement, a stored procedure, or a stored function. Any of these actions returns a result set for data returned by the query. Each row of the result set corresponds to a row in the event store. The adapter constructs a business object for each event and delivers it to the exports (also called endpoints) configured for (or have subscribed to) the specific business object.
For both standard and custom event processing, you can specify how often the adapter polls for events and how many events it retrieves each polling period.
- Outbound processing
When an application component needs to query the existence of a record in the database or retrieve or modify data in the database, the adapter acts as the connector between the application component and the database. The adapter provides a set of standard outbound operations, which process either after-image or delta style business objects. The adapter also supports both local and XA (distributed) transactions for outbound processing.- Inbound processing
The adapter supports inbound event management with event delivery. Events are processed from an event store that is populated either by the database application or from the result of custom queries that you provide. You control how often the adapter polls for events and how many records are delivered to the export at one time.- Business objects
A business object is a structure that consists of data, the action to be performed on the data, and additional instructions, if any, for processing the data. IBM WebSphere Adapter for JDBC uses business objects to represent tables and views in the database as well as the results of database queries, stored procedures, and stored functions. Business objects can also create a hierarchy of objects from your database and group unrelated tables. Your component communicates with the adapter using business objects.- Tables, views, and synonyms overview
Databases provide the common database objects that include tables, views, and synonyms.- Stored procedure overview
A stored procedure can be a business object that your module runs with the Execute operation. It can run in place of the standard SQL for an operation on any business object, or it can perform additional actions before or after performing an operation.- Stored procedure business object overview
You can create a stored procedure business object that corresponds to a stored procedure or stored function in the database.
You can then use the Execute operation to run the stored procedure against the data in the database.
- Stored procedures used in place of or in addition to operations
You can specify that the adapter use a stored procedure in the database in place of, before, or after the SQL statements that the adapter uses to perform an operation. Each business object can have a different set of stored procedures used with each operation.
- Stored functions overview
Some databases support stored functions in addition to stored procedures. Stored functions are like stored procedures except that they always return a value. The adapter supports them in a similar manner.- Query business object overview
Query business objects run a user-defined SELECT statement against the database and return the matching records in business objects.- Batch SQL business object overview
A batch SQL business object runs one or more user-defined INSERT, UPDATE, and DELETE statements and returns the status of the statements.- The external service wizard
Use the external service wizard in IBM Integration Designer to discover objects in a database; to generate batch SQL, query, and wrapper business objects; and to generate business objects from selected database objects. The wizard also generates the module and the service artifacts that enable the adapter to run as a Service Component Architecture (SCA) component.- Log and Trace Analyzer
The adapter creates log and trace files that can be viewed with the Log and Trace Analyzer.- Business faults
The adapter supports business faults, which are exceptions that are anticipated and declared in the outbound service description, or import. Business faults occur at predictable points in a business process, and are caused by a business rule violation or a constraint violation.
Overview of IBM WebSphere Adapter for JDBC
Related tasks:
Setting deployment properties and generating the service
Setting deployment properties and generating the service
Related reference: