ExamQuestions.com

Register
Login
Java EE 7 Application Developer Exam Questions

Oracle

Java EE 7 Application Developer

55 / 72

Question 55:

Give the code fragment: 
image
And the code fragment: 
image
The sendConfirmation() and reserve() methods should be executed in the same transactional context. Which transaction attributes do you ensure this? 

Answer options:

A. Add annotations: @TransactionAttribute (TransactionAttributeType.REQUIRES_NEW) at line 2, @Transactional at line 9 and @TransactionAttribute ((TransactionAttributeType.MANDATORY) at line 12
B. No additional annotations are required.
C. Add annotations: @TransactionAttribute (TransactionAttributeType.REQUIRED) at line 2, @Transactional at line 9 and @TransactionAttribute ((TransactionAttributeType.REQUIRES_NEW) at line 12
D. Add annotations: @TransactionAttribute (TransactionAttributeType.MANDATORY) at line 2, @Transactional at line 9 and @TransactionAttribute ((TransactionAttributeType.REQUIRES_NEW) at line 12