Card 23 / 59: What transactional behavior would a method in an EJB follow when it is annotated with @TransactionAttribute(REQUIRES_NEW) ?
A)
The container creates a new transaction before each call for the method, and in case of an already existing transaction, an exception will be thrown
B)
The container creates a new transaction before each call for the method, and in case of an already existing transaction, the existing transaction is suspended untill the new transaction completes
C)
The container creates a new transaction before each call for the method only in case of no existing transaction. Otherwise, it uses the existing transaction to carry out the method
Answer:
B) The container creates a new transaction before each call for the method, and in case of an already existing transaction, the existing transaction is suspended untill the new transaction completes
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|