Skip to content
Sharp

Dependency Injection · interview question

In the context of Spring Boot, what is a potential downside of self-invocation in transaction management?

Multiple choiceHardchapter-9-curatedpremiumdependency-injectionconstructor-vs-field-injection
Choose one answer
Answer and explanation

Correct answer

B. It may bypass transactional proxies.

Why

Self-invocation bypasses the proxy that Spring uses to manage transactions, meaning that any transactional annotations on the invoked method will be ignored, leading to potential transactional issues.

Test yourself on Dependency Injection

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

Start free test
All Dependency Injection questions →