commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: [dbcp] Callable statement pooling (DBCP-204)
Date Tue, 10 Nov 2009 22:19:59 GMT
Phil Steitz wrote:
> Mark Thomas wrote:
>> Phil Steitz wrote:
>>> OK, I am now feeling stupid.
>> You and me both.
>>
>>> GKOP already has LRU-cache like
>>> behavior. (See clearOldest test in allocate()).  Given compat
>>> issues, I am inclined to move forward with 0).
>> +1
>>
>> We'll also need pool 1.5.4 as well to fix an edge case where the pool
>> could lock up.
>>
>> Mark
>>
> 
> One question.  The patch introduces a statement type flag as part of
> the key to distinguish prepared statements from callable statements.
>    I am not sure this is necessary.  Can anyone imagine a scenario
> where the same exact sql is used in prepareStatement and
> prepareCall?  Are there drivers that even allow this ("call" in
> prepareStatement sql, or no "call" in prepareCall) If not, we do not
> need the additional flag.

As CallableStatement extends PreparedStatement there may be some edge
cases where the same sql could be used. It isn't something I would do
but I can how it might work with some drivers (I haven't tested any).

Given that the sql would normally be very different, I don't see the
harm including the statement type in the key apart from a small
inefficiency in key construction but I don't see that as a major issue.

Mark




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


Mime
View raw message