Hi,
I agree that cost/benefit don't pay for a more advanced approach on the 
getConnection() method only.
This slim and fast built-in connection pool do their job well in their scope. 
An industrial strength CP involve many other things and maybe redesign.
I think that's better to maintain this CP as is, patching and making 
improvements that don't conflict with its size and simplicity. For other uses 
we always have the option to use DBCP or other fat CP.
I agree too about concurrent improvement, that there are cases where the 
overhead introduced to do something better getting the overall worst and 
shinning only in extreme conditions of concurrency.

regards,
Dario.

El 08/08/10 03:59, Thomas Mueller escribió:
> Thanks a lot for the patch! It looks good, and I will apply it for the
> next release. I hope I can also write a test case. Using
> java.util.concurrent is an option, but I don't think it's required
> (actually I want to avoid using it for Java 1.4 compatibility). I know
> the algorithm is not "fair" but in reality I don't think thats a
> problem (fair scheduling is very slow).
>
> Regards,
> Thomas
>
> On Sunday, August 8, 2010, Joe <[email protected]> wrote:
>> Dario,
>>
>> The mechanism you describe in your patch is exactly what I was
>> thinking would do the trick.  Specifically it addresses the issue of
>> properly waiting the configured time interval regardless of how many
>> cycles it takes.
>>
>> This approach still has the risk that a waiter could be starved out of
>> getting the connection resource while other waiters within that time
>> could obtain the resource.  This is because the mechanism for waiting/
>> notification is unordered and not guaranteed.  Practically though, i
>> don't think this is a real issue and the cost to fix it might exceed
>> the benefit (at least without using Java 6 concurrency libraries).
>>
>> Thanks!
>> Joe
>>
>> On Aug 7, 1:08 pm, Dario Fassi <[email protected]> wrote:
>>>> Attached goes a candidate patch that almost solve the premature exit
>>>> of getConnection() method.
>>>> Use it as sees fit.
>>>> regards,
>>>> Dario.


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to