OTS/XA transaction model

EJB Server includes CORBA Object Transaction Service (OTS) and X/Open architecture (XA) as one of its distributed transaction models. The Transarc Encina® transaction coordinator manages OTS/XA transactions for EJB Server. You can define components, and component methods so that the transaction coordinator automatically handles transactions (called implicit control). You can also write code in the component or client to manage transactions (called explicit control).

EJB Server provides for distributed transactions using the two-phase commit protocol. Two-phase commit ensures that all changes to recoverable resources (for example, multiple database servers) occur atomically, and the failure of any resource to complete causes all other resources to undo changes. Two-phase commit consists of a prepare phase and an execution phase. In the prepare phase, the transaction coordinator validates that all resources are available. In the execution phase, the transaction coordinator executes all updates to the resources.

NoteEJB Server does not currently support nested OTS/XA transactions (also called subtransactions). If a method attempts to create a subtransaction, the SubTransactionUnavailable exception is raised.

An OTS/XA transaction coordinator uses XA resources to manage transactions. An XA resource manages information using an XA-compliant interface, for example, a database server or IBM’s MQSeries® (a message queueing system). The XA interface standard is an element of the X/Open Distributed Transaction Processing (DTP) model. Currently, Sybase provides an XA-compliant interface through CT-Lib. In addition, EJB Server supports jConnect, which is a JTA (Java Transaction API)-compliant JDBC driver. See the “Managing XA resources” for detailed information about enabling and managing XA resources.

Component lifecycle and transactional behavior

A component with the OTS-Style transaction attribute enabled follows the standard component lifecycle as described in “Component lifecycles”.

Generally, OTS transactions behave in the same way as described in “The EJB Server transaction processing model”. For more information about component transaction attributes, see “Transactional component attribute”.

EJB Server does not support transactions that spawn over multiple EJB Servers.