Hello,
Does DBCP close the connection related resources (e.g.
PreparedStatements) on the return to the pool? From a cursory look at
the source code, it looks like it only closes the connection-related
resources if the connection is closed and removed from the pool - not
when the user code just calls Connection.close(), thereby returning the
connection to the available pool.
If that is by design, then why? It seems that it would place an extra
onerous on user code to be peppered with 'try/finally' clauses to catch
all hanging Statements... [The problem is partially solved by using
DbUtils, which has the 'try/finally' blocks, but why not let DBCP
cleanup these resources? Is there a meaningful case where the connection
is returned to the pool, but the Statement should not be closed?]
TIA,
Alik
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
|