Explicit note on TransactionalEventListener versus reactive transactions
Closes gh-25805
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,6 +36,12 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* method allows you to prioritize that listener amongst other listeners running before
|
||||
* or after transaction completion.
|
||||
*
|
||||
* <p><b>NOTE: Transactional event listeners only work with thread-bound transactions
|
||||
* managed by {@link org.springframework.transaction.PlatformTransactionManager}.</b>
|
||||
* A reactive transaction managed by {@link org.springframework.transaction.ReactiveTransactionManager}
|
||||
* uses the Reactor context instead of thread-local attributes, so from the perspective of
|
||||
* an event listener, there is no compatible active transaction that it can participate in.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Sam Brannen
|
||||
* @since 4.2
|
||||
|
||||
Reference in New Issue
Block a user