Home » Oracle » 1z0-134 » Which three scenarios would JMS always redeliver a message?
You are concerned with messages being received systematically. You designed Message-Driven beans (MDB) to guarantee the most reliable way to consume messages.
In which three scenarios would JMS always redeliver a message? (Choose three.)
A. when the onMessaqe() method of the MDB throws a Java error
B. when the transaction the MDB participates in eventually fails and rolls back
C. when the onMessage() method fails to acknowledge the reception of the message
D. when messages are not being sent as part of a transaction
E. when messages are non-persistent
Correct Answer: BCD
Explanation/Reference:
An MDB pool processes each message at least once. Potentially, a message can be process more than once:
* If an application fails, a transaction rolls back, or the hosting server instance fail during or after the onMessage() method completes but before the message is acknowledged or committed, the message will be redelivered and processedagain.
* Non-persistent messages are also redelivered in the case of failure, except for the case where the message’s host JMS server shuts down or crashes, in which case the messages are destroyed.
To ensure that a message is processed exactly once, use container-managed transactions so that failures cause transactional MDB work to rollback and force the message to be redelivered.
Reference: https://docs.oracle.com/cd/E13222_01/wls/docs81/ejb/message_beans.html
Download Printable PDF. VALID exam to help you PASS.
|
|