← Quiz: Spring AOP and Proxies: all 10 questions
Quiz: Spring AOP and Proxies · Question 1 of 10
Who actually begins and commits the transaction for a @Transactional service method?
Who actually begins and commits the transaction for a @Transactional service method?
- A.The database driver, automatically
- B.A proxy object that Spring puts around the bean
- C.The controller that calls the service
- D.The Java compiler adds the code
Answer & explanation
Correct answer: A proxy object that Spring puts around the bean
Spring injects a proxy; the proxy starts the transaction, calls the real method, then commits or rolls back.
Can you get the rest right without peeking?
Take the timed Quiz: Spring AOP and Proxies quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →