commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject [dbcp] Callable statement pooling (DBCP-204)
Date Sat, 31 Oct 2009 16:28:13 GMT
I agree that DBCP should support callable statement pooling and the
patch attached to DBCP-204 is a reasonable way to do it.  What I am
concerned about is that adding callable statements to the prepared
statement pool with the current implementation may break some
applications by causing them to go beyond MaxPreparedStatements.
Unfortunately, the current behavior is to throw SQLException on
prepareStatement when this happens.  I see four options.

0) Damn the torpedoes - apply patch as is
1) Change the prepared statement pool to behave as an LRU cache
2) Stick with KeyedObjectPool implementation, but create and do not
pool new statements when the pool is exhausted
3) Leave implementation as is but add a new KeyedObjectPool for
callable statements

I think 1) is the best option, but it is a significant change in
behavior, so should probably wait until 2.0
2) same as 1), though easier to implement
3) Could be done for 1.3, but would require new config parameter
that would go away in 2.0.
0) is too risky, IMO

I would appreciate opinions or better ideas.  Thanks!

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message