File tree 1 file changed +8
-2
lines changed
singleton/src/main/java/com/iluwatar
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3
3
/**
4
4
*
5
5
* 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
+ *
8
8
* http://stackoverflow.com/questions/70689/what-is-an-efficient-way-to-implement-a-singleton-pattern-in-java
9
9
*
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
10
16
*/
11
17
public class App {
12
18
You can’t perform that action at this time.
0 commit comments