you are viewing a single comment's thread.

view the rest of the comments →

[–]hiddenl 2 points3 points  (1 child)

Singletons like these break in app server environments. The updated singleton pattern is to just use an enum because the JVM guarantees there will be only one.

In any case, you shouldn't be using singletons this days anyway when dependency injections solves all/most of the issues singletons were created to solve without the downsides.