Which of the following is true about EJB transactions?

Options
- Nested transactions are supported by EJB 2.0
- Isolation levels specification is supported by EJB 2.0
- Bean-managed transaction demarcation must not be used in Message-driven beans
- Bean-managed transaction demarcation must not be used in Entity beans


CORRECT ANSWER : Bean-managed transaction demarcation must not be used in Entity beans

Discussion Board
EJB transactions

Transaction Attributes for Bean-Managed Transactions must not be used in Entity beans as the bean specifies transaction demarcations using methods in the javax.transaction.UserTransaction interface. These transactions include stateful or stateless session beans with a transaction-type set to Bean. Any stateful or stateless session is managed by other methods that is why Entity beans cannot use bean-managed transactions.

For stateless session beans, it need to be considered that the entering and exiting transaction contexts must match.

In case of stateful session beans, the entering and exiting transaction contexts may or may not match. In case it is not matched then EJB container server maintains associations between the bean and non-terminated transaction.

Rohit Sharma 08-21-2014 06:48 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement