Hi,
I'm using a Connection Pool and providing it to the JOOQ Factory. So it
should open and close connections automatically?
My issue is, I have a method as follows
public Factory work() {
Factory factory = new Factory(getConnectionPool(), SQLDialect.H2, settings);
factory.setAutoCommit(true);
return factory;
}
And I use it like:
Jooq.work().select().from(Tables...).fetch();
The problem is I have a connection leak. If I comment out the
factory.setAutoCommit(true) then I don't get the connection leak, but I'd
like auto commit on so any updates are automatically committed.
So. Am I using this in the wrong way?. I guess the setAutoCommit shouldn't
really be called until the .execute() or .fetch() when JOOQ gets the
connection?
Thanks, Ryan