https://kotlinlang.org logo
#spring
Title
# spring
a

Arivnd Ramesh

12/06/2023, 9:52 PM
Does the
@Transactional
annotation work with coroutines? We were having an issue with this some time back, and I thought I saw this was addressed in a recent Spring release, but for the life of me I can't find it anymore.
r

Riccardo Lippolis

12/06/2023, 10:10 PM
maybe you saw this in the release notes of Spring 5.3.0. Looking at the related GitHub issue, it looks like it only works when using the Reactive transaction management
although it's not mentioned in the docs, where they only mention the programmatic variant: https://docs.spring.io/spring-framework/reference/languages/kotlin/coroutines.html#transactions
👀 1
k

kubele

12/08/2023, 9:21 AM
Would be use of Loom a solution for using jdbc with coroutines? 🤔
Copy code
withContext(Executors.newVirtualThreadPerTaskExecutor().asCoroutineDispatcher()) { ... }
7 Views