New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support suspending functions annotated with @Transactional #23575
Labels
Milestone
Comments
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Sep 3, 2019
This commits adds Coroutines extensions for TransactionalOperator.transactional that accept suspending lambda or Kotlin Flow parameters. @transactional on suspending functions is not supported yet, spring-projectsgh-23575 has been created for that purpose. This commit also renames invokeHandlerMethod to invokeSuspendingFunction in CoroutinesUtils. Closes spring-projectsgh-22915
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Sep 3, 2019
This commits adds Coroutines extensions for TransactionalOperator.transactional that accept suspending lambda or Kotlin Flow parameters. @transactional on suspending functions is not supported yet, spring-projectsgh-23575 has been created for that purpose. This commit also renames invokeHandlerMethod to invokeSuspendingFunction in CoroutinesUtils. Closes spring-projectsgh-22915
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Sep 3, 2019
This commits adds Coroutines extensions for TransactionalOperator.transactional that accept suspending lambda or Kotlin Flow parameters. @transactional on suspending functions is not supported yet, spring-projectsgh-23575 has been created for that purpose. Closes spring-projectsgh-22915
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Sep 3, 2019
This commit adds Coroutines extensions for TransactionalOperator.transactional that accept suspending lambda or Kotlin Flow parameters. @transactional on suspending functions is not supported yet, spring-projectsgh-23575 has been created for that purpose. Closes spring-projectsgh-22915
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. |
This feature would be really nice. 👍 |
Is there a workaround for this? While we wait for @transactional support apart from manually rolling back. |
For now you can use the programmatic variant via |
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Oct 25, 2020
This commit makes TransactionInterceptor and TransactionAspectSupport Coroutines aware, adapting Reactive transaction support to Coroutines. Suspending functions returning a Flow are handled like Flux, for other return types the are handled like Mono. Closes spring-projectsgh-23575
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Oct 25, 2020
This commit makes TransactionInterceptor and TransactionAspectSupport Coroutines aware, adapting Reactive transaction support to Coroutines. Suspending functions returning a Flow are handled like Flux, for other return types, they are handled like Mono. Closes spring-projectsgh-23575
sdeleuze
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Oct 25, 2020
This commit makes TransactionInterceptor and TransactionAspectSupport Coroutines aware, adapting Reactive transaction support to Coroutines. Suspending functions returning a Flow are handled like Flux, for other return types, they are handled like Mono. Closes spring-projectsgh-23575
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
As a follow-up of #22915, this issue is about supporting suspending functions annotated with
@Transactional
. It seems not straightforward to callCoroutinesUtils.invokeHandlerMethod(method: Method, bean: Any, vararg args: Any?): Any?
fromTransactionAspectSupport.ReactiveTransactionSupport#invokeWithinTransaction
where we deal with a parameter-lessInvocationCallback
.The text was updated successfully, but these errors were encountered: