Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware 2V0-72.22 Exam - Topic 9 Question 78 Discussion

Actual exam question for VMware's 2V0-72.22 exam
Question #: 78
Topic #: 9
[All 2V0-72.22 Questions]

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.)

Show Suggested Answer Hide Answer
Suggested Answer: D

When using Spring transaction management with annotation-driven mode, the @Transactional annotation will be processed by a TransactionInterceptor that implements the AOP advice interface. This interceptor will be applied to the target bean through a proxy that implements the same interface as the target bean. Therefore, when a method of the target bean is called from outside, it will actually invoke the proxy method, which will delegate to the interceptor and then to the actual target method.

However, when a method of the target bean is called from within the same bean, it will not go through the proxy and thus bypass the interceptor logic. In this case, when update1() calls update2(), it will not start a new transaction as specified by REQUIRES_NEW propagation level, but rather join the existing transaction initiated by update1() itself.


Contribute your Thoughts:

0/2000 characters
Shelton
12 days ago
B seems right. Exceptions are common in nested transactions.
upvoted 0 times
...
Mel
17 days ago
I’m with C. REQUIRES_NEW should use the active one.
upvoted 0 times
...
Mari
23 days ago
A makes sense. Two transactions are better for isolation.
upvoted 0 times
...
Pearly
28 days ago
I lean towards D. update2() doesn't go through the proxy.
upvoted 0 times
...
Lavelle
1 month ago
I feel B is correct. Can't start a new one in an existing.
upvoted 0 times
...
Timmy
1 month ago
C) is definitely wrong, it doesn't use the existing one.
upvoted 0 times
...
Terrilyn
2 months ago
Wait, I thought REQUIRES_NEW always creates a new transaction?
upvoted 0 times
...
Alethea
2 months ago
D) sounds right since it's about proxy calls.
upvoted 0 times
...
Belen
2 months ago
A) is correct, REQUIRES_NEW starts a new transaction.
upvoted 0 times
...
Brendan
2 months ago
B) An exception is thrown as another transaction cannot be started within an existing transaction.
upvoted 0 times
...
Dean
3 months ago
Haha, I bet the exam writers are having a field day with these Spring AOP questions!
upvoted 0 times
...
Jettie
3 months ago
D) There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.
upvoted 0 times
...
Dan
3 months ago
C) There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.
upvoted 0 times
...
Pete
3 months ago
I’m a bit confused about whether an exception would be thrown. I thought REQUIRES_NEW could start a new transaction even if one exists.
upvoted 0 times
...
Dominga
3 months ago
I think I came across a similar question where it mentioned that if a method is called directly, it might not go through the proxy. That makes me lean towards option D.
upvoted 0 times
...
Lavera
3 months ago
I feel pretty good about this one. The key is understanding how REQUIRES_NEW works - it will always start a new transaction, even if there's an existing one. So option A is the correct answer, since there will be 2 separate transactions. I'll go with that.
upvoted 0 times
...
Buddy
4 months ago
I'm a bit confused by this question. The way I understand it, REQUIRES_NEW should always start a new transaction, so I'm not sure why option C would be correct. I'll need to review my notes on Spring transaction management to make sure I have the right understanding.
upvoted 0 times
...
Sue
4 months ago
Okay, let me think this through step-by-step. The question says the application is using Spring transaction management, and that REQUIRES_NEW is being used. Based on that, I think option C is the best answer, since REQUIRES_NEW will reuse an existing transaction if there is one. I'll mark that one.
upvoted 0 times
...
Thaddeus
4 months ago
I think it's A. REQUIRES_NEW starts a new transaction.
upvoted 0 times
...
Edda
4 months ago
I remember studying how REQUIRES_NEW works, but I'm not entirely sure if it creates a new transaction or not.
upvoted 0 times
...
Gregoria
5 months ago
I disagree, B) makes more sense here.
upvoted 0 times
...
Lucia
5 months ago
I feel like option A is correct since REQUIRES_NEW should always start a new transaction, but I need to double-check that.
upvoted 0 times
...
Freeman
5 months ago
Hmm, this is a tough one. I'm leaning towards option C, since I remember from the lectures that REQUIRES_NEW will use an existing transaction if there is one. But I'm not 100% confident, so I'll need to double-check the details.
upvoted 0 times
...
Soledad
5 months ago
I'm not sure about this one. The question seems to be testing our understanding of Spring transaction management, which can be tricky. I'll need to carefully read through the options and think about how REQUIRES_NEW works.
upvoted 0 times
Lanie
2 days ago
Option D makes sense too. The proxy issue could affect the transaction.
upvoted 0 times
...
Lenita
7 days ago
I'm leaning towards B. An exception might occur with nested transactions.
upvoted 0 times
...
Quinn
4 months ago
I think it's option A. REQUIRES_NEW always starts a new transaction.
upvoted 0 times
...
...

Save Cancel