Oracle
1Z0-860 · Question #303
A developer is implementing a message-listener method of an EJB 3.0 message-driven bean. The developer wants to make sure that the message receipt is immediately rolled back in case the message…
The correct answer is A. Use Container-Managed Transactions with transaction attribute REQUIRED. See the full explanation below for the reasoning.
Question
A developer is implementing a message-listener method of an EJB 3.0 message-driven bean. The developer wants to make sure that the message receipt is immediately rolled back in case the message listener method is aborted with a runtime exception. Which option can the developer use?
Options
- AUse Container-Managed Transactions with transaction attribute REQUIRED.
- BUse Container-Managed Transactions with transaction attribute NOT_SUPPORTED.
- CUse Bean-Managed Transactions and the JMS API for message acknowledgement.
- DUse Bean-Managed Transactions and write a try-catch-finally block that calls UserTransaction.
How the community answered
(30 responses)- A77% (23)
- B7% (2)
- C13% (4)
- D3% (1)
Community Discussion
No community discussion yet for this question.