12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System Contracts<br />

Transaction Management<br />

Transactional access to multiple EISs is an important and often critical requirement for<br />

enterprise applications. The Connectors supports transaction access to multiple,<br />

heterogeneous EISs - where a number of interactions must be committed together, or<br />

not at all, in order to maintain data consistency and integrity.<br />

VisiConnect utilizes the <strong>Borland</strong> Enterprise Server's transaction manager and supports<br />

Resource Adapters conforming to the following transaction support levels.<br />

■<br />

■<br />

■<br />

No Transaction support: if a Resource Adapter supports neither Local<br />

Transactions nor XA Transactions, it is non-transactional. If an application<br />

component uses a non-transactional Resource Adapter, the application component<br />

must not involve any connections to the respective EIS in a transaction. If the<br />

application component is required to involve EIS connections in a transaction, the<br />

application component must use a Resource Adapter which support Local or XA<br />

Transactions.<br />

Local Transaction support: the application <strong>server</strong> manages resources directly,<br />

which are local to the Resource Adapter. Unlike XA Transactions, local transactions<br />

can neither participate in the two-phase commit (2PC) protocol, nor participate as a<br />

distributed transaction (whereas the transaction context is simply propagated);<br />

instead, local transactions solely target one-phase commit (1PC) optimization. A<br />

Resource Adapter defines the type of transaction support in its Sun standard<br />

deployment descriptor. When an application component requests an EIS connection<br />

as part of a transaction, <strong>Borland</strong> Enterprise Server starts a local transaction based<br />

on the current transaction context. When the application closes the connection,<br />

<strong>Borland</strong> Enterprise Server commits the local transaction, and cleans up the EIS<br />

connection once the transaction is completed.<br />

XA Transaction support: a transaction is managed by a transaction manager<br />

external to the Resource Adapter and the EIS. A Resource Adapter defines the type<br />

of transaction support in its Sun-standard deployment descriptor. When an<br />

application component demarcates an EIS connection request as part of a<br />

transaction, the <strong>Borland</strong> Enterprise Server is responsible for enlisting the XA<br />

resource with the transaction manager. When the application component closes that<br />

connection, the application <strong>server</strong> unlists the XA resource from the transaction<br />

manager, and cleans up the EIS connection once the transaction is completed.<br />

In compliance with the Connectors 1.0 specification, VisiConnect provides full<br />

support for all three specified transaction levels.<br />

One-Phase Commit Optimization<br />

In many cases, a transaction is limited in scope to a single EIS, and the EIS resource<br />

manager performs its own transaction management - this is the Local Transaction. An<br />

XA Transaction can span multiple resource managers, thus requiring transaction<br />

coordination to be performed by an external transaction manager, typically one<br />

packaged with an application <strong>server</strong>. This external transaction manager can either use<br />

the 2PC protocol, or propagate the transaction context as a distributed transaction, to<br />

manage a transaction that spans multiple EISs. If only one resource manager is<br />

participating in an XA Transaction, it uses the 1PC protocol. In an environment where a<br />

singleton resource manager is handling its own transaction management, 1PC<br />

optimization can be performed, as this involves a less expensive resource than a 1PC<br />

XA Transaction.<br />

Chapter 26: VisiConnect overview 249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!