1Z0-895 · Question #70
MyMsg is a JMS message-driven bean with container-managed transaction demarcation. FooBean is an EJB 3.x stateless session bean that sends message to the JMS destination with MyMsgBean is…
The correct answer is C. FooBean receives the original RuntimeException thrown from the message listener method. Note: public interface MessageListener A MessageListener object is used to receive asynchronously delivered messages. Each session must insure that it passes messages serially to the listener. This means that a listener assigned to one or more consumers of the same session can…
Question
Options
- AFooBean receives javax.ejb.EJBException.
- BThe container discards the MyMsgBean bean instance.
- CFooBean receives the original RuntimeException thrown from the message listener method.
- DThe container does NOT roll back the transaction, and FooBean can continue the transaction.
How the community answered
(35 responses)- A3% (1)
- B17% (6)
- C71% (25)
- D9% (3)
Explanation
Note: public interface MessageListener A MessageListener object is used to receive asynchronously delivered messages. Each session must insure that it passes messages serially to the listener. This means that a listener assigned to one or more consumers of the same session can assume that the onMessage method is not called with the next message until the session has completed the last call. Reference: Enum TransactionAttributeType
Topics
Community Discussion
No community discussion yet for this question.