A developer wants to achieve the following two behaviors for an EJB 3.0 session bean:
(1) If the client calls a business method with a transaction context, the container will invoke the
enterprise bean’s method in the client’s transaction context.
(2) If the client calls a business method without a transaction context, the container will throw the
javax. ejb. EJBTransactionRequiredException.
Which transaction attribute should be used?
A.
REQUIRED
B.
SUPPORTS
C.
MANDATORY
D.
REQUIRES_NEW
E.
NOTSUPPORTED