You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a scenario with a ReactiveTransactionManager in the context, I expected methods annotated with @Transactional handled by this transaction manager.
However, only methods exposing some sort of reactive API (Flux, Mono and related) are handled via TransactionAspectSupport.
would effectively need two transaction managers, or at one of the methods will fail. With only a reactive transaction manager, boom fails:
java.lang.IllegalStateException: Specified transaction manager is not a PlatformTransactionManager:
While boom is probably not a method that can be used in a sensible way in a reactive context, it's something that's gonna happen eventually and should be at least documented.
As I don't have a good idea, what else to use to decide about which transaction manager to use, I try not to suggest making it work in another way, but just be very clear in the docs about what to expect.
The text was updated successfully, but these errors were encountered:
sbrannen
changed the title
Document the behaviour of At-Transactional in reactive environments with non-reactive signatures.
Document the behaviour of @Transactional in reactive environments with non-reactive signatures
Jul 11, 2019
sbrannen
changed the title
Document the behaviour of @Transactional in reactive environments with non-reactive signatures
Document behaviour of @Transactional in reactive environments with non-reactive signatures
Jul 11, 2019
The exception is already different and more expressive now than above: "Cannot apply reactive transaction to non-reactive return type [void] with specified transaction manager: ..." - I'll also add corresponding documentation notes for @Transactional.
Given a scenario with a
ReactiveTransactionManager
in the context, I expected methods annotated with@Transactional
handled by this transaction manager.However, only methods exposing some sort of reactive API (
Flux
,Mono
and related) are handled viaTransactionAspectSupport
.So given a component like
would effectively need two transaction managers, or at one of the methods will fail. With only a reactive transaction manager,
boom
fails:While
boom
is probably not a method that can be used in a sensible way in a reactive context, it's something that's gonna happen eventually and should be at least documented.As I don't have a good idea, what else to use to decide about which transaction manager to use, I try not to suggest making it work in another way, but just be very clear in the docs about what to expect.
The text was updated successfully, but these errors were encountered: