Nested Transactions with Spring Boot
This tutorial demonstrates the use of declarative transaction management within a Spring Boot 2 application via local transaction management using annotation based configuration with the Nested Propagation Level. If you don't know what Nested Transactions or why we use them then this is the perfect tutorial for you. I take a Spring Boot 2 application and simulate loading spacecraft timed commands into the satellite's database via nested transactions. Spring's JDBC Template is used in a @Transactional context and persists the data into a H2 embedded database. This tutorial demonstrates the use of the DataSourceTransactionManager which supports Nested Transactions out of the box with Spring Boot. Spring has always supported the standard 6 transaction propagation levels whose names are analogous to those in EJB land. They are specified below and can be inserted directly with the following @Transactional annotation. @Transactional(propagation = Propagation.**SEE LIST BELOW**) REQUIRED (* default) REQUIRES_NEW SUPPORTS NOT_SUPPORTED MANDATORY NEVER There is however one more, a 7th propagation level that not many know about and that is the NESTED transaction propagation level. Unfortunately it’s not supported by all transaction managers and it is easily confused with REQUIRES_NEW. We will explore the @Transactional(propagation = Propagation.NESTED) syntax and I'll explain the difference that Nested Transactions have with the other REQUIRES_NEW Propagation Level. Read the blog post "Spring Nested Transactions" here ... http://mvpjava.com/spring-nested-tran... The Project/demo Source code is available on MVP Java's GitHub account here ... https://github.com/mvpjava/spring-nes... Just git clone ... "git clone https://github.com/mvpjava/spring-nes..." DON'T CLICK THIS!!! http://bit.ly/2UmF76l ====================================================== Subscribe to MVP Java ... https://www.youtube.com/c/MVPJava?sub... Follow me ... Website : http://www.mvpjava.com Facebook : / mvpjava Twitter : / mvpjava GitHub : https://github.com/mvpjava DockerHub: https://hub.docker.com/?namespace=mvp... My company www.triomni-it.com

Component vs @Service in Spring | An Actual Answer

How @Transactional works ? Transactional propagation explained ! Transaction Management #springboot

Spring & Spring Data JPA: Managing Transactions

How Netflix Uses Java - 2026 Edition

Spring Transaction Management - The beginning | @Transactional | Spring Boot | | Part 1

Spring Transactions and @Transactional Annotation Explained | Part 1

Transaction Synchronization and Spring Application Events by Bartłomiej Słota

Spring Boot Transaction Propagation Explained | Real-Time Hands-On Example | @Java Techie

Top 10 Spring Annotations to know in 2024

Spring Boot | Spring Data JPA Transaction Management | @Transactional | JavaTechie

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker
![[QUESTION] Why doesn't @Transactional work when called within the same class?](https://i.ytimg.com/vi/gDpmbUoEpPQ/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLDuK1G2gn5dQUn5LykZ7ir3zvGm9Q)
[QUESTION] Why doesn't @Transactional work when called within the same class?

I Think They Are Lying To You

Spring Boot Deep Dive | How It Simplifies Java Apps & Microservices

Transactional Gotchas in Spring Boot Tests

Saga Design Pattern for managing Distributed Transactions (An Introduction)

Spring @Transactional Deep Dive | Spring Boot | Spring Data JPA

Spring Data JPA Relationships - ManyToMany, ManyToOne & OneToMany

Spring Boot Tutorial for Beginners - Crash Course using Spring Boot 3

