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.


On Mon, Mar 29, 2021 at 10:59 AM Walid CHAIB <[email protected]> wrote:

> Why when I execute a query with jooq parsing connection I get
> You can see in the attached files the code of the server and the
> connection :
>
> - jOOQ:3.15
> <dependency>
> <groupId>org.jooq.pro</groupId>
> <artifactId>jooq</artifactId>
> <version>3.15.0</version>
> </dependency>
> <dependency>
> <groupId>org.jooq.pro</groupId>
> <artifactId>reactivestreams</artifactId>
> <version>3.15.0</version>
> </dependency>
> - Java:8
> - Database :Postgresql
> - OS:open suse
> - JDBC Driver:4.2
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/CAOP4Xxin-Mw6jky9q-3O3pP3Fh6h6hYw3f4pDp%3DaS9x07KRbFg%40mail.gmail.com
> <https://groups.google.com/d/msgid/jooq-user/CAOP4Xxin-Mw6jky9q-3O3pP3Fh6h6hYw3f4pDp%3DaS9x07KRbFg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO6%3DKV6QmZiUvp6%3DPtYhZGQScK1rZGYoe_PwQYF47DDa%2Bg%40mail.gmail.com.

Reply via email to