Skip to content
Sharp

Spring Core · interview question

What happens if a method marked with @Transactional calls another method within the same class that is also marked with @Transactional?

Multiple choiceHardchapter-9-curatedpremiumspring-corepersistence-and-validation
Choose one answer
Answer and explanation

Correct answer

C. The second method's transaction is ignored

Why

Due to Spring's proxy-based transaction management, self-invoked methods do not trigger transaction boundaries. The inner transaction is ignored, and both run in the outer transaction context.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →