Can transaction management be externally managed in Spring Boot, or must it be within the application?

Spring Boot defaults to application-managed local transactions through @Transactional, but transaction management can also be handled externally through container-managed or distributed transaction coordinators when transactions span multiple resources or systems.

Key Points

Example

A legacy application updating both an Oracle database and a JMS queue in the same transaction uses a JTA transaction manager to guarantee both operations commit or roll back together, something a plain local @Transactional couldn't coordinate.

Interview Tip

A concise interview answer is

By default Spring Boot manages transactions locally with @Transactional and a single PlatformTransactionManager, but when a transaction spans multiple resources, like two databases, I'd bring in JTA for distributed, container-managed transactions. In a microservices context though, I'd usually favor the Saga pattern over distributed transactions to avoid that coordination overhead.

Last updated: 16 July 2026

Previous question: What mechanisms does Spring Boot provide for transaction management?

Next question: You are designing an e-commerce application requiring precise control over transactions. What approach would you take in Spring Boot?

More Spring Boot - Level IV (Advanced) interview questions

All Spring Boot - Level IV (Advanced) questions