I’m not that familiar with novelties in Java/Kotlin, but I would take a look at https://www.jooq.org.

Also, it seems Spring also has some support for transactions in a “reactive” setting (https://spring.io/blog/2019/05/16/reactive-transactions-with-spring). However, the basic idea of implicitly passing a “transactional context” remains: here through Context instead of a ThreadLocal.

Scala software engineer, Functional Programming enthusiast, SoftwareMill co-founder