Home » Tag Archives: Singleton Pattern

Tag Archives: Singleton Pattern

The Perfect Singleton

java-logo

From time to time I met Java programmers that are not really sure how they should implement Singleton pattern properly. (if you don’t have an idea what Singleton is just try Wikipedia: Singleton pattern). And I’m not talking about proper implementation in threaded environment. But using the most common implementation you can find over internet you can easily create as ...

Read More »

The dreaded double checked locking idiom in Java

java-logo

The issue discussed in this article is not new, but still tricky even for seasoned developers. The singleton pattern is a common programming idiom. Nevertheless when used with multiple threads, some type of synchronization must be done in order not to break the code. In a relevant article our JCG partner Manoj Khangaonkar from The Khangaonkar Report examines the double-checked locking idiom in ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials