File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

any singleton pattern early instantiated issues

 
Krishnaa Kumar
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I came across some issues using lazy instantiated singleton pattern

Reference: http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html.

Similarly is there any issues in using early instantiated singleton pattern?
 
Nomaan Butt
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Krishnna,
Below text from the link mentioned by you above specifies that issues with lazy initialization of singletion have been taken care off.
JDK5 and later extends the semantics for volatile so that the system will not allow a write of a volatile to be reordered with respect to any previous read or write, and a read of a volatile cannot be reordered with respect to any following read or write




 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic