Skip to content
Sharp

Spring Core · interview question

In Spring, what is the primary role of a dynamic proxy when using @Transactional?

Multiple choiceEasychapter-9-curatedpremiumspring-coretransactions-and-proxies
Choose one answer
Answer and explanation

Correct answer

D. To intercept method calls and manage transaction boundaries

Why

Dynamic proxies in Spring are used to intercept method calls to manage transaction boundaries. They start a transaction before the method executes and commit or roll back the transaction depending on the method's outcome.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →