As a follow-up of #22915, this issue is about supporting suspending functions annotated with @Transactional
. It seems not straightforward to call CoroutinesUtils.invokeHandlerMethod(method: Method, bean: Any, vararg args: Any?): Any?
from TransactionAspectSupport.ReactiveTransactionSupport#invokeWithinTransaction
where we deal with a parameter-less InvocationCallback
.
Comment From: sdeleuze
It looks like I won't have the bandwidth to do that for Spring Framework 5.2, so this is a good candidate for Spring Framework 5.3.
Comment From: ghost
This feature would be really nice. 👍
Comment From: davidb-e4s
Is there a workaround for this? While we wait for @Transactional support apart from manually rolling back.
Comment From: sdeleuze
For now you can use the programmatic variant via TransactionalOperator
Coroutines extensions.