Double-checked locking antipattern (was: svn commit: r959875 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java)

2010-07-03 Thread Adrian Crum
As the article and the book (Java Concurrency In Practice) both point out - the motivation for using DCL (to overcome slow speed) is less of an issue (or a non-issue) with newer JVMs. I am not a Java expert. But enough Java experts have stressed the need to eliminate this anti-pattern that I

Re: Double-checked locking antipattern (was: svn commit: r959875 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java)

2010-07-03 Thread Jacques Le Roux
Thanks Adrian, Are they examples from the books or your own? Jacques From: Adrian Crum adrian.c...@yahoo.com As the article and the book (Java Concurrency In Practice) both point out - the motivation for using DCL (to overcome slow speed) is less of an issue (or a non-issue) with newer JVMs.

Re: Double-checked locking antipattern (was: svn commit: r959875 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java)

2010-07-03 Thread Adrian Crum
The static field example is from the book. -Adrian --- On Sat, 7/3/10, Jacques Le Roux jacques.le.r...@les7arts.com wrote: Thanks Adrian, Are they examples from the books or your own? Jacques From: Adrian Crum adrian.c...@yahoo.com As the article and the book (Java Concurrency In