Network Deployment (Distributed operating systems), v8.0 > Reference > Developer detailed usage information


JDBC mediator transactions

We can specify that the JDBC mediator either act as transaction manager, or refrain from such activities in the case of external transaction management (performed by the SDO client).


Mediator managed transactions

A JDBC connection is wrapped in a connection wrapper and passed to the Data Mediator Service (DMS) during the instance creation. The ConnectionWrapper object contains the connection used by the JDBC DMS and indicates whether the mediator manages the current transaction. When the JDBC DMS manages the transaction, it performs commit and rollback operations as required. However, the DMS does not perform any transaction management activities if the wrapped connection is currently engaged in another transaction.

Use the createConnectionWrapper method for active transaction management is the general practice.


Non-mediator managed transactions

When a passive connection wrapper is passed to the DMS, the DMS takes no managerial action; a passive wrapper is generally intended for an existing transaction that is under external management. Commit or rollback operations are not performed by the connection wrapper in this case.

Use the createPassiveConnectionWrapper method.


Protection against referential integrity (RI) violations

The JDBC Data Mediator Service safeguards data transactions from incurring RI violations and other database logic violations. When the JDBC DMS applies the updates of a data graph to a back end, it automatically orders the change operations so that they do not violate database RI policy. Similarly, the DMS filters counter operations (such as INSERT and DELETE) so that opposing client requests can perform updates in a logical order. The client deletes one object, and then creates an entirely separate object with the same primary key. The DMS transforms these two operations into an update operation that modifies the existing database object.


Related


JDBC mediator exceptions
Define optimistic concurrency control for JDBC Mediator

+

Search Tips   |   Advanced Search