Give the code fragment:
And the code fragment:
The sendConfirmation() and reserve() methods should be executed in the same transactional context.
Which transaction attributes do you ensure this?
Give the code fragment:
And the code fragment:
The sendConfirmation() and reserve() methods should be executed in the same transactional context.
Which transaction attributes do you ensure this?
In the provided code, the `@Stateless` annotation indicates that the `Warehouse` and `Shop` classes are stateless session beans, which typically implies that they use container-managed transactions. By default, enterprise beans use the `REQUIRED` transaction attribute, meaning the container will create a new transaction if none exists, or join the caller's transaction if one is already active. Hence, no additional annotations are required to ensure that the `sendConfirmation()` and `reserve()` methods are executed within the same transactional context.
B is the correct answer
B is correct as the transaction should already be managed automatically
B. REQUIRED (Default) The method became part of the caller s transaction. If the caller does not have a transaction, the method runs its own transaction.