which two statements are correct?

Given :
9. @Stateful
10. @TransactionManagement(TransactionManagementType. BEAN)
11. public class FacadeBean implements Facade {
12 @EJB Business business;©Resource SessionContext ctx;
13. public void startStuff0 throws Exception {
14. ctx.getUserTransactionQ.beginO;
15. business. doA0;

16. business. doBQ;
17.}
18. public void endStuff0 throws Exception {
19. ctx.getUserTransactionO.commit0;
11.©Stateless
12. public class BusinessBean implements Business {
13.©Resource SessionContext ctx;
14. public void doAO { ctx.setRollbackOnlyQ; }
15. @TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)
16. public void doBQj}
A client calls startStuff and endStuff subsequently. Assuming NO other transaction-related
metadata, which two statements are correct? (Choose two.)

Given :
9. @Stateful
10. @TransactionManagement(TransactionManagementType. BEAN)
11. public class FacadeBean implements Facade {
12 @EJB Business business;©Resource SessionContext ctx;
13. public void startStuff0 throws Exception {
14. ctx.getUserTransactionQ.beginO;
15. business. doA0;

16. business. doBQ;
17.}
18. public void endStuff0 throws Exception {
19. ctx.getUserTransactionO.commit0;
11.©Stateless
12. public class BusinessBean implements Business {
13.©Resource SessionContext ctx;
14. public void doAO { ctx.setRollbackOnlyQ; }
15. @TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)
16. public void doBQj}
A client calls startStuff and endStuff subsequently. Assuming NO other transaction-related
metadata, which two statements are correct? (Choose two.)

A.
MethoddoB isnevercalled.

B.
The transactionin methoddoB is committed.

C.
The transactioninmethod doB is rolledback.

D.
An exception is thrown when calling method endStuff.

E.
An exception is thrown when calling method startStuff.



Leave a Reply 0

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