Hi all, Does anybody know how to implement a singleton in Java that guarantees that there is only one object instantiated across JVM's? I am asking this within the context of a J2EE container. My problem is I want to create a singleton for my application but the problem is that the J2EE container may choose to run multiple JVM's in a distributed environment therefore I could not use the traditional singleton pattern implementation in Java (i.e. use a static getter and so on). Any thoughts would be much appreciated. thanks eric
There was a discussion here about a Singleton pattern across multiple JVMs. The main idea of it was to have some form of external "registry", be it a file, windows registry entry, db table entry etc that indicates whether the instance can be created or not.