Which Types of EJBs Can Use BMT?

An EJB with BMT must be either a session bean or a message-driven bean. Entity beans use only container-managed transaction demarcation. Because the EJB architecture does not support nested transactions, your EJB instance that starts a transaction must complete that transaction before it starts a new transaction. Your transaction is completed when it is either committed or rolled back. The EJB container manages client invocations to an EJB with BMT. When writing code for a client, you invoke a business method via the EJB's home or component interface; the EJB container suspends any transaction that might be associated with the client request. If a transaction is associated with the instance, the container associates ...

Get Sams Teach Yourself EJB 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.