Does jOOQ work with a @Transactional annotation in a SpringBoot application? #15733
-
When I try the jOOQ insertInto with a transactional annotation, it doesn't seem to roll back with an error. Additionally, when I save an entity with a JPA repository (calling its save and flush method) and try to retrieve the created record with the jOOQ select under a transactional, it only yields a null value (while the record is successfully returned when when done without a transactional). I guess this is perhaps due to the JPA repository transaction not being shared by the jOOQ context. Does jOOQ work under a transactional annotation? And if so, is there any configurations to be set? The jOOQ version I used is 3.18.7, and SpringBoot 3.1.4. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem has been solved. It seems that I should have used TransactionAwareDataSourceProxy for the jOOQ's connection provider in the configurations. |
Beta Was this translation helpful? Give feedback.
The problem has been solved. It seems that I should have used TransactionAwareDataSourceProxy for the jOOQ's connection provider in the configurations.