DCL(double-checked locking) is bad, mkay?

2010-02-10 Thread Adam Heath
I've been working in the conversion system lately, and discovered a problem with it's DCL anti-pattern usage. This is not meant to single out the conversion framework, it's just a convient example. In Converters.getConverter(Class, Class), there is this pattern: === Converter result =

Re: DCL(double-checked locking) is bad, mkay?

2010-02-10 Thread Adrian Crum
Adam Heath wrote: I've been working in the conversion system lately, and discovered a problem with it's DCL anti-pattern usage. This is not meant to single out the conversion framework, it's just a convient example. In Converters.getConverter(Class, Class), there is this pattern: ===

Re: DCL(double-checked locking) is bad, mkay?

2010-02-10 Thread Adam Heath
Adrian Crum wrote: I agree that DCL is a bad pattern to use, and coincidentally, I was researching the subject last weekend - hoping to find a good alternative to propose to the community. Ofbiz has generally been very luck with it's use of DCL. Most cases are hit at startup, and from then