2V0-72.22PSE · Question #66
Refer to the exhibit. Assume that the application is using Spring transaction management which uses Spring AOP internally. Choose the statement that describes what is happening when the update1…
The correct answer is D. There is only one transaction initiated by update1() because the call to update2() does not go. The first update method will create a transaction and run in a proxy, and when the second update method is called, it will be executed within the same transaction in the same proxy.
Question
Refer to the exhibit. Assume that the application is using Spring transaction management which uses Spring AOP internally. Choose the statement that describes what is happening when the update1 method is called? (Choose the best answer.)
Exhibit
Options
- AThere are 2 transactions because REQUIRES_NEW always runs in a new transaction.
- BAn exception is thrown as another transaction cannot be started within an existing transaction.
- CThere is only one transaction because REQUIRES_NEW will use an active transaction if one
- DThere is only one transaction initiated by update1() because the call to update2() does not go
How the community answered
(36 responses)- A6% (2)
- B11% (4)
- C19% (7)
- D64% (23)
Explanation
The first update method will create a transaction and run in a proxy, and when the second update method is called, it will be executed within the same transaction in the same proxy.
Topics
Community Discussion
No community discussion yet for this question.
