Bean Managed Transaction Demarcation
If an EJB is deployed using bean managed transaction demarcation (here referred to as BMTD, though this abbreviation isn't used in the EJB specification itself), the EJB container allows the bean to obtain a reference to a javax.transaction.UserTransaction object using the EJBContext. You can see this in Figure 8.3.
Motivation and Restrictions
An EJB might need to be deployed under BMTD if the conditions on which a transaction is started depend on some programmatic condition. It could be that one method starts the transaction and another method completes the transaction.
However, the cases where BMTD is needed are few and far between. Indeed, they are so rare that the EJB specification limits BMTD to Session ...
Get Sams Teach Yourself J2EE™ in 21 Days 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.