
jOOQ Masterclass
By :

The jOOQ SPI exposes a suite of providers such as TransactionProvider
, RecordMapperProvider
, ConverterProvider
, and so on. Their overall goal is simple—to provide some feature that is not provided by the jOOQ default providers. For instance, let's check out TransactionProvider
.
For instance, we know that jOOQ transactions are backed in Spring Boot by a transaction provider named SpringTransactionProvider
(the Spring Boot built-in implementation of jOOQ's TransactionProvider
) that exposes by default a read-write transaction with no name (null
), having the propagation set to PROPAGATION_NESTED
and the isolation level to the default isolation level of the underlying database, ISOLATION_DEFAULT
.
Now, let's assume that we implement a module of our application that serves only reports via jOOQ transactions (so we don't use @Transactional
). In such a module, we don't want to allow writing, we want to run each query...