Adrian Crum wrote:
> --- On Fri, 3/12/10, Adam Heath <doo...@brainfood.com> wrote:
>> Adrian Crum wrote:
>>> --- On Fri, 3/12/10, Adam Heath <doo...@brainfood.com>
>> wrote:
>>>> Search for synchronized in
>>>> ShoppingCart.  You'll fine a couple of
>>>> spots that lock on cartLines, a few that lock in
>> the class
>>>> instance
>>>> itself.  But then no other hits.
>>>>
>>>> However, tons of internal variables all need to be
>> kept
>>>> self-consistent with each other, so locking
>> against just
>>>> one or the
>>>> other of those variables won't work.
>>> These same problems exist in a number of classes - not
>> just the shopping cart (take a look at SequenceUtil for some
>> really scary code). That's why I suggested a synchronization
>> best practices page that the community can follow.
>>
>> I have looked at SequenceUtil, and have a version lying
>> around that is
>> non-blocking.  I need to pull that out of the attic,
>> and put it in my
>> staging tree, and run with it for a while.
> 
> It would be cool if you could send it to me. I can get SequenceUtil to break 
> fairly easily with my multi-threaded data loading modification - so I think 
> it would be a good test for your code.

I'm having a hard time finding it.

However, I'll take the time to ask a question.  Why does
SequenceUtil.SequenceBank.fillBank do direct sql calls, and not use
the delegator to update values?

I'm thinking about adding test cases for SequenceUtil, but I'd like to
be able to test it in stand-alone mode.  Would being able to do small
ofbiz startups, ie, with all components upto and including the current
one, just to run the current components test cases, be a useful feature?

Reply via email to