This repository was archived by the owner on May 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
singleton/src/main/java/com/iluwatar Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 33/**
44 *
55 * Singleton pattern ensures that the class (IvoryTower) can have only one
6- * existing instance per java vm instance and provides global access to that it.
7- *
6+ * existing instance per java classloader instance and provides global access to it.
7+ *
88 * http://stackoverflow.com/questions/70689/what-is-an-efficient-way-to-implement-a-singleton-pattern-in-java
99 *
10+ * The risk of this pattern is that bugs resulting from setting a singleton up in a distributed environment can
11+ * be tricky to debug, since it will work fine if you debug with a single classloader. Additionally, these
12+ * problems can crop up a while after the implementation of a singleton, since they may start out synchronous and
13+ * only become async with time, so you it may not be clear why you are seeing certain changes in behaviour.
14+ *
15+ * http://stackoverflow.com/questions/17721263/singleton-across-jvm-or-application-instance-or-tomcat-instance
1016 */
1117public class App {
1218
You can’t perform that action at this time.
0 commit comments