nerdexam
Broadcom-VMware

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.

Data Access

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

2V0-72.22PSE question #66 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)
  • A
    6% (2)
  • B
    11% (4)
  • C
    19% (7)
  • D
    64% (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

#@Transactional#REQUIRES_NEW#Spring AOP proxy#self-invocation

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice