In a clustered J2EE environment , what pattern should I use to mimick the functionality of a Singleton pattern ?
In the current setup the application is on a single instance of the application server and uses a singleton class that contains a hashMap which needs to be accessed / updated by multiple listeners , which receive messages of a queue.
The challenge is to move to J2EE components and use a clustered environment. In a clustered env. , there would be multiple JVMs and hence the singleton pattern will fail. Is there a solution to this issue ?
[ May 31, 2005: Message edited by: Obiwan Kenobi ]