~/talk

Transaction Synchronization and Spring Application Events

Talkat Voxxed Days Bucharest 2018 · 2018-03-22..03-23· [spring, microservices]
slides:none on file

Creates a Customer entity, publishes a CustomerCreated event after saving with Spring Data JPA and an embedded H2, and attempts token generation in a listener; initial test shows token is missing because the listener runs in the same transaction and afterCommit callbacks still see original transaction resources. Solution options shown: mark the listener with REQUIRES_NEW to create an autonomous transaction or run the handler with @Async; unit tests fail first then pass after changing to REQUIRES_NEW or async.

AI-written summary · about

  1. 0:00Introduction
  2. 1:39Agenda
  3. 5:07IDE
  4. 5:43Customer class
  5. 7:42Why not use simple gathers and setters
  6. 9:24Service method
  7. 10:02Transactional method
  8. 10:40Spring Boot Test
  9. 12:40Token Generation
  10. 15:52Customer ID
  11. 16:25Publisher
  12. 18:58Test
  13. 19:43Transactional EvenListener
  14. 21:10Synchronization Phases
  15. 21:41Testing
  16. 23:36Autonomous Transaction
  17. 24:16Synchronization
  18. 25:41Enabling ancing
  19. 26:18Static wait
  20. 27:58Reliability and Data Consistency
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.