Hello, can I use JCS in case of either optimizing compilers or shared memory multiprocessors?
In the JCS documentation "Using JCS: Some basics for the web" the example class BookVObjManager uses the Double-checked locking idiom. This idiom is widely cited and used as an efficient method for implementing lazy initialization - but the references cited below show, that the Double-Checked Locking idiom does not work in case of either optimizing compilers or shared memory multiprocessors. Is this idiom used in JCS internally, too? Many thanks, Georg Juttner References: http://developer.java.sun.com/developer/technicalArticles/Programming/singletons http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html Example for the Double-checked locking idiom: // Double-checked locking -- don't use public static MySingleton getInstance() { if (_instance==null) { synchronized (MySingleton.class) { if (_instance==null) { _instance = new MySingleton(); } } } return _instance; } | inasys GmbH | +49-228-5205-0 (fon) | Am Propsthof 76 | +49-228-5205-100 (fax) | D-53121 Bonn | http://www.inasys.de | | Gesch�ftsf�hrer: Ralf Schuster | Handelsregister Bonn HRB 3994 | Ust-IDNr. DE 122 120 637 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
