Multiple choice technology programming languages

Consider the method getUserTransaction() of the interface Entity- Context. From which methods of an entity bean class can this method be called?

  1. ejbCreate<method>

  2. Home business methods

  3. Business methods exposed in the component interface

  4. ejbStore()

  5. None of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

The getUserTransaction() method from EntityContext can ONLY be called from business methods in the component interface, and only for bean-managed transaction (BMT) entity beans. It cannot be called from ejbCreate, ejbStore, or home business methods - these methods have specific transaction context restrictions. Entity beans with container-managed transactions (CMT) cannot use getUserTransaction() at all.