Grokking Spring Boot
Vote

0% completed

​

Propagation

When one transactional method calls another, how many transactions are running?

In the booking service, one call to book now runs three transactional methods. BookingService.book is transactional, and it calls two other beans whose methods are transactional too: BookingAttemptLog, which records every attempt to book a seat, and Notifier, which stores a confirmation and emails it. If all three share one transaction, a failed email can roll back a paid booking. If each one gets its own transaction, a failed booking can leave a confirmation for a seat that nobody holds.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content