A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction.
Which of the following statements are true?
A. The transaction timeout is immediately disable.
B. The container will ensure that the transaction will never commit.
C. The bean must have started the current transaction for this to be legal.
D. The bean must have bean-managed transaction demarcation for this to be legal.
E. The bean must have container-managed transaction demarcation for this to be legal.
Given answer: B,E
In Ivan's
EJB exam study guide,
"According to the EJB 3.1 specification, the setRollbackOnly and getRollbackOnly methods
are not available in PostConstruct methods of stateless session beans since these methods
are executed in an unspecified transaction context. "
Based on what Ivan's notes, C should be correct if the bean is a CMT bean. It is because setRollbackonly is applicable to an active transaction , not applicable to an unspecified transaction context.