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 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. MANDATORY
b. SUPPORTS
c. NOT_SUPPORTED





Answer: A


Learn More :