Which statement is true about the result of the message processing?

MyMsgBean is a JMS message-driven with container-managed transaction demarcation. FooBean
is an EJB 3.x stateless session bean that sends messages to the JMS destination with which
MyMsgBean is associated.
MyMsgBeans message listener method has transaction attribute REQUIRED, and is defined as follows:

Which statement is true about the result of the message processing?

MyMsgBean is a JMS message-driven with container-managed transaction demarcation. FooBean
is an EJB 3.x stateless session bean that sends messages to the JMS destination with which
MyMsgBean is associated.
MyMsgBeans message listener method has transaction attribute REQUIRED, and is defined as follows:

Which statement is true about the result of the message processing?

A.
FooBean receives javax.ejb.EJBException.

B.
The container discards the MyMsgBean bean instance.

C.
FooBean receives the original RuntimeException thrown from the message listener method.

D.
The container does NOT roll back the transaction, and FooBean can continue the transaction.

Explanation:
Note:
*Required Attribute
If the client is running within a transaction and invokes the enterprise beans method, the method
executes within the clients transaction. If the client is not associated with a transaction, the
container starts a new transaction before running the method.
The Required attribute is the implicit transaction attribute for all enterprise bean methods running
with container-managed transaction demarcation. You typically do not set the Requiredattribute
unless you need to override another transaction attribute. Because transaction attributes are
declarative, you can easily change them later.



Leave a Reply 2

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


Figaro

Figaro

B.
FooBean has no acces to MyMessageBean. It’s only message producer.