Open mbknor opened 9 years ago
Here is the workaround I used: https://github.com/NextGenTel/akka-tools/commit/95baa15a1c7e92c9160557943784c66465443a0a
You have to use the try-with-resources.
I just reproduced this issue on my code, testing sql2o for the first time. I found that the Quarkus Agroal connection pooling is showing leak detection warnings (and I trust it from my own experiences writing a Jdbc layer).
Agroal shows this warning: Datasource '
The issue only happens with transactions (sql2o.beginTransaction()), and it is fixed with the commit above (5225455).
But it is not merged into the master branch... I'm wondering why? This is a very important fix in my mind.
Just wondering when this will make it to the master branch... and then I am eager for a release with this.
Based on my testing... this is a very good and critical fix and is solved with the above commit.
sql2o 1.5.2 and 1.5.4
If using beginTransaction and createQuery without explicit closing, commit with closeConnection=true will leak statements when using pooled connections.
I'm using Oracle and get "ORA-01000: maximum open cursors exceeded"
The problem is that Connection.commit(true) uses closeJdbcConnection() instead of close() which would have closed Statements before closing connection.
Example: