EJBs and Transactions

One of the services provided by the EJBs container is transactional control. Transactions can be controlled either programmatically by the developer or declaratively by the container. If transactions for a bean are controlled by the container, they are considered container-managed transactions (CMTs) and are declared by making entries in a configuration file used to deploy the EJB application. If the transactions for a bean are controlled by programmatic instructions, then they are considered bean-managed transactions (BMTs).

Since entity beans are guaranteed to be synchronized with a persistent data store, they are considered transactional by nature. With session beans, transactions are optional, but with entity beans, ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.