which code can be added at Line 13 to guarantee that business method methodA will execute only if invoked with an active transaction?

Given the following stateful session bean:
10. @Stateful
11. @TransactionAttributefJransactionAttributeType. SUPPORTS)
12. public class VideoBean implements Video {
13. // insert code here
14. public void methodAO {}
15.}
Assuming no other transaction-related metadata, which code can be added at Line 13 to
guarantee that business method methodA will execute only if invoked with an active transaction?

Given the following stateful session bean:
10. @Stateful
11. @TransactionAttributefJransactionAttributeType. SUPPORTS)
12. public class VideoBean implements Video {
13. // insert code here
14. public void methodAO {}
15.}
Assuming no other transaction-related metadata, which code can be added at Line 13 to
guarantee that business method methodA will execute only if invoked with an active transaction?

A.
@TransactionAttributefJ

B.
@TransactionManagement(TransactionAttributeType. CONTAINER)

C.
@TransactionAttribute(TransactionAttributeType.MANDATORY)

D.
@TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)



Leave a Reply 0

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