Hi Walid,
- Whoever opens a JDBC Connection is responsible for closing it again
- Your example is now passing the DataSource to jOOQ, in case of which jOOQ will open *and* close the connection for you
- However, you also close the underlying (wrapped) JDBC connection explicitly in closeDbConn. You probably shouldn't do that
- I gave you that particular hint about a possible workaround in closeDbConn, because at the time, you were passing the *Connection* (not DataSource) to jOOQ, meaning *you* were opening the connection and *you* were responsible for closing it again. You cannot, however, close it via the jOOQ ParsingConnection, because the jOOQ ParsingConnection follows the jOOQ ConnectionProvider lifecycle, meaning that because you gave jOOQ a connection which *you* opened, jOOQ is assuming that *you* will close it again, not jOOQ.
I don't think there's a new question here, short of perhaps a misunderstanding of the above.
If you think there's a bug here somewhere, I'd love to investigate it, but as I told you, these kinds of issues are very hard to debug by email snippets. We have a template to create MCVEs (Minimal, Complete, Verifiable Examples):
https://github.com/jOOQ/jOOQ-mcve.