Unless I'm missing something it appears that you can make JOOQ and JPA coexist with @Transactional if you make the following changes to the example in GitHUB.
1. In SpringTransactionProvider.java change the injected tx from DataSourceTransactionManager to PlatformTransactionManager (it's the interface DataSourceTransactionManager implements).
2. In Application.java replace the following method:
@Bean
public DataSourceTransactionManager transactionManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
With:
@Bean
public PlatformTransactionManager transactionManager() {
return new JpaTransactionManager(entityManagerFactory().getObject());
}
The EntityManagerFactory should already be defined in your config. That's pretty much it. Since the EntityManager has your dataSource already it should allow the two to coexist with transactions.
This should make it easier to migrate from JPA to JOOQ incrementally.
Let me know if I've missed anything.
R.