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.
This commit is contained in:
committed by
Oliver Drotbohm
parent
5dfffa2244
commit
85ce443ce5
@@ -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) { /* … */ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user