About Question com.enthuware.ets.scbcd.v5.2.340 :

Moderator: admin

Post Reply
ETS User

About Question com.enthuware.ets.scbcd.v5.2.340 :

Post by ETS User »

Question:


Bean A with transaction attributes of "NotSupported" for all its methods.

Bean B with transaction attributes of "Mandatory" for all its methods.

A method mA in bean A calls a method mB on Bean B.

Assuming that the method invocation is local, which of the following statements is correct?

Correct answer:
The bean A instance will be discarded.
And explanation:
Because it will get a javax.ejb.EJBTransactionRequiredException, which extends from EJBException and thus is a system exception.

I think, this conditions are not sufficient
You are right that javax.ejb.EJBTransactionRequiredException which is a system exception, bean should be discard but
when the bean A is in transaction context it shouldn't be discarded. I think that correct explanation should be like this:

Because it will get a javax.ejb.EJBTransactionRequiredException, which extends from EJBException and thus is a system exception and the bean a is not in transaction's context. The last sentence fully describe such a behavior.

Am i right ?

Regards
Radoslaw

Post Reply

Who is online

Users browsing this forum: No registered users and 73 guests