Support for Distributed Transactions
- The EJB container is capable of handling the distributed transactions
for the beans
- The EJB server takes a role of the transaction coordinator
- Transaction support in EJB is based on the Java Transaction Service
(JTS). JTS is to a large extent the Java mapping of CORBA's
Object Transaction Service (OTS).
- The Java Transaction Service (JTS) takes care of coordinating all resources
involved in a transaction (commonly by two-phase commit approach)
- Transaction policies of the bean are most often defined during the deployment
process using declarative statements. In this case, the EJB container explicitly
manages the start, commit and rollback of a transaction
- The bean may choose to implement a interface through which the container
notifies it about significant events of the transaction
- Optionally, transactions can be controlled by the client application and the bean itself
|