VMware vRealize Automation 8.x (2022) — Question 56
Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation? (Choose the best answer.)
Answer options
- A. Starts a new transaction but throws an exception if an active transaction already exists.
- B. Joins a transaction if one already exists; throws an exception if an active transaction does not exist.
- C. Starts a new transaction; if an active transaction already exists, it is suspended.
- D. Runs in a nested transaction if an active transaction exists; throws an exception if an active transaction does not exist.
Correct answer: C
Explanation
The correct answer is C because the Propagation.REQUIRES_NEW annotation indeed suspends any existing transaction and starts a new one. Option A is incorrect as it does not throw an exception but rather suspends the current transaction. Option B is wrong because it does not join an existing transaction but starts a new one. Option D is incorrect because it does not run in a nested transaction; it completely suspends the existing one.