Search code examples
memory-managementjdbcconnection-poolingapache-commons-dbcp

How commons dbcp (and other connection pools) manage open statements and resultsets?


Specifically, when I return a connection to the pool, does dbcp (and other connection pools) close the statements and resultsets for me?

Or should I be closing these myself?


Solution

  • OK I see that statements are closed by dbcp in DelegatingConnection.passivate() and DelegatingStatement.close() closes the resultsets.