From 85ce443ce5a7d1b80cb20baab2d1707ca5ce7a63 Mon Sep 17 00:00:00 2001 From: Yossi Spektor Date: Fri, 2 Jun 2023 19:41:05 +0300 Subject: [PATCH] GH-213 - Specify proper transactional propagation type in docs. The default propagation type of @Transactional is Propagation.REQUIRED. That, however would reuse the already running committed transaction which is not the correct behavior. Related ticket: #80. --- src/docs/asciidoc/40-events.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/asciidoc/40-events.adoc b/src/docs/asciidoc/40-events.adoc index 4b9772ec..57d577dd 100644 --- a/src/docs/asciidoc/40-events.adoc +++ b/src/docs/asciidoc/40-events.adoc @@ -87,7 +87,7 @@ To run a transactional event listener in a transaction itself, it would need to class InventoryManagement { @Async - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) @TransactionalEventListener void on(OrderCompleted event) { /* … */ } }