Oracle
1Z0-860 · Question #49
A session bean's business method invokes User Transaction.set Rollback Only and receives an HlegalStateException. Under which circumstance canthis happen?
The correct answer is C. The bean is using bean-managed transaction demarcation, and UserTransaction.begin has NOT been. See the full explanation below for the reasoning.
Question
A session bean's business method invokes User Transaction.set Rollback Only and receives an HlegalStateException. Under which circumstance canthis happen?
Options
- AThe bean is using bean-managed transactions regardless of whether there is an active transaction.
- BThere is no circumstance that would cause setRollbackOnly to throw an HlegalStateException.
- CThe bean is using bean-managed transaction demarcation, and UserTransaction.begin has NOT been
- DThe set Rollback Only method is invoked within a bean-managed transaction, and
How the community answered
(20 responses)- A10% (2)
- B5% (1)
- C80% (16)
- D5% (1)
Community Discussion
No community discussion yet for this question.