Multiple choice technology programming languages

Which methods of the EntityContext interface can be called from within an ejbPostCreate of an entity bean class?

  1. getEJBObject()

  2. getPrimaryKey()

  3. getEJBHome()

  4. getRollbackOnly()

  5. getUserTransaction()

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

During ejbPostCreate, the entity bean's identity is fully established, meaning getEJBObject() and getPrimaryKey() can be safely called. getEJBHome() and transaction methods like getRollbackOnly() are also accessible. However, getUserTransaction() is invalid because entity beans must use container-managed transactions (CMT) and cannot use bean-managed transactions.