RDBMS System Integration Using XI 3
RDBMS System Integration Using XI 3
0 JDBC
Sender/Receiver adapter
The J2EE-based Adapter Engine of SAP XI 3.0 provides various adapters that can be
used to connect external systems to the Integration Engine. These adapters convert XML
and HTTP-based messages to the specific protocols and formats of the respective external
systems and the other way around. The XI JDBC Sender adapter enables content (data) to
be sent from databases to the integration server/PCK.Let us look at the various
architecture approaches possible in this scenario.
Direct approach where in the XI JDBC adapter is configured to poll the source
table
Indirect approach where in the XI JDBC adapter is configured to use
polling/staging table
Direct approach
In this approach, the XI JDBC sender adapter regularly polls the actual source table for
data to be posted to XI, based on the user configured polling parameters (poll interval,
retry interval etc).The result set that matches the SELECT statement specified in the
adapter configuration (Query SQL Statement parameter) is converted into a valid XML
document and sent to the integration engine for further processing. The adapter then
executes the SQL statement specified in the Update SQL Statement parameter which will
probably update a FLAG/STATUS column in the source table so that the data that was
polled during the current cycle is marked as READ.
Requires modification of the source table definition to add the STATUS column
that is required to prevent polling duplicate data.
May lead to database deadlock/inconsistency, if other business users also have
direct (from the back-end) or indirect (say, using a J2EE application) access to the
source table.
This approach is more intrusive since it operates directly on the customer’s
business data.
Indirect approach
In this approach, the actual source table is shielded from XI JDBC adapter by using a
polling/staging table. Results of DML operation performed on the source table is
reflected to the staging tables by means of database triggers deployed on the source table.
The XI JDBC sender adapter polls the staging table for new data and the result of the
Query SQL statement is converted to XML document structure and sent to the integration
engine.
The various database objects involved in this approach are listed and explained below
Pros
The advantages of using this approach is that it is non intrusive (customers do not
prefer exposing direct access to their business data), since JDBC adapter polls the
staging tables and not the source tables.
No modification to Source table definition is required.
Loose coupling between the integration logic and the actual business data thus
facilitating flexibility for future modifications/enhancements.
Cons
Direct approach where in the XI JDBC adapter is configured to directly save data
in the destination table
Indirect approach using staging tables and database triggers
Indirect approach using stored procedures and ccBPM
Direct Approach
In this approach, the JDBC receiver adapter is configured to directly update the
destination table. SAP XI provides predefined canonical formats based on which schemas
(integration metadata) have to be created and made available in the repository. The XI
JDBC receiver adapter performs various DML operations (INSERT / UPDATE /
DELETE / UPSERT) based on the action keyword specified in the schema.
In this approach, the JDBC receiver adapter fetches XML data from the integration
engine, based on the canonical format used; appropriate DML operation is performed on
the staging table. Database triggers deployed on the staging table move the data to the
destination tables (AFTER INSERT/AFTER UPDATE/AFTER DELETE triggers).
In this approach, ccBPM is used along with the JDBC receiver adapter. This approach is
more flexible and exploits significant features of the JDBC adapter and ccBPM. XML
data from the integration engine is fetched by the integration process and passed on to the
JDBC receiver adapter which then performs a DML operation on the staging table. The
response is sent back to BPM which then executes a call to the PL/SQL stored procedure
deployed on the database system. This stored procedure moves data from staging table to
the destination table.
Observations