posted 18 years ago
Problem
Given:
Bean A with transaction attributes of "RequiresNew" for all its methods.
Bean B with transaction attributes of "Supports" for all its methods.
A client having a transaction context calls a method mA() on bean A, which in turns calls a method mB() on Bean B.
Assuming all invocations are local, which of the following statements is correct if mB() encounters a system exception?
Options
Select 3 correct options.
1) The client's transaction will be marked for roll back.
2) The client will get a javax.ejb.EJBException but it can continue with the same transaction.
3) The client will get a javax.ejb.TransactionRolledbackLocalException
4) The bean B instance will be discarded.
5) mA() will get a javax.ejb.TransactionRolledbackLocalException
6) The bean A instance will NOT be discarded.
7) Changes made to the database by mA(), will be commited.
The correct answers marked was 2,4,5. but i disagree with 2 being correct. the spec only states that the client tran may or may not be marked for rollback.
Has this kind of questions appeared on the real exam?