Understanding Container-Managed Transactions

In an EJB with container-managed transactions (CMT), the EJB container sets the boundaries of the transactions. This simplifies application development because the EJB developer does not include code that begins, commits, and rolls back the transaction. Implicitly, the container begins a transaction immediately before an EJB method starts, and commits the transaction just before the method exits. Each method can be associated with a single transaction. Nested or multiple transactions are not allowed within a method. Container-managed transactions do not require all methods to be associated with transactions. When deploying a bean, you specify which of the bean's methods are associated with transactions ...

Get Sams Teach Yourself EJB in 21 Days now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.