Which option can the developer use?

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 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.



Leave a Reply 0

Your email address will not be published. Required fields are marked *