Iam using JOOQ/Hikari to perform DB operations on Postgres. I have been trying to look at some examples of using Transactional operations using JOOQ on generated DAOs. Most of my colleagues use Spring Transactions but I am using Guice for DI so do not want to bring spring into picture. Any links or ideas are greatly appreciated? If that matters, my App is built on Ratpack.
Asked
Active
Viewed 1,172 times
2 Answers
1
If you are using ratpack I recommend looking at https://github.com/ratpack/ratpack/blob/master/ratpack-jdbc-tx/src/main/java/ratpack/jdbctx/Transaction.java

rus
- 121
- 3
-
Thank you. we are not using 1.5. I am looking for JOOQ support. – Vijay Ram Aug 04 '17 at 15:01
-
That will work for jooq too when you are able to upgrade – rus Aug 04 '17 at 15:19
1
JOOQ also supports transaction from 3.6 This is based on JDBC transaction.
Although transaction is not possible from generated DAOs, it is possible to use it at the DSLContext level(lower level APIs to interact with DB)
Here is the documentation. https://www.jooq.org/doc/3.6/manual/sql-execution/transaction-management/

Vijay Ram
- 285
- 2
- 15