Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Will the connection pool close off statements/preparedStatements/callableStatements when I close/release the connection?

0
Posted

Will the connection pool close off statements/preparedStatements/callableStatements when I close/release the connection?

0

As of v0.6.4 onwards, no, though it will issue warnings if you forget to do so (with the right config settings enabled). This ensures that during development you can fix all the relevant bugs whilst not affecting general performance. However the JDBC spec is very unclear on the expected behaviour of what should happen when a connection is closed so always make sure to close off the statements you are done with manually yourself anyway. Consider how your application would behave if in future you need to change to a different connection pool for example.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123