Grokking Spring Boot
Vote

0% completed

​

What a Transaction Guarantees

We ran the same booking request twice against the booking service. Each time, Ben asked for seat A12 at event 7, the service saved his booking, and then the payment provider declined his card. The only difference between the two runs was one annotation on the service method. These are the counts that the test printed afterwards:

BookingService.bookBookings left in the table after the declined payment
Without @Transactional1
With @Transactional0

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content