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?
A.
Use Container-Managed Transactions with transaction attribute REQUIRED.
B.
Use Container-Managed Transactions with transaction attribute NOT_SUPPORTED.
C.
Use Bean-Managed Transactions and the JMS API for message acknowledgement.
D.
Use Bean-Managed Transactions and write a try-catch-finally block that calls UserTransaction.
rollback in case of a RuntimeException.