Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Pattern »

Re: Singleton in clustered environment

Guy Katz

2004-12-02


you can put your singleton in JNDI and have all servers go to that spot.
problem there is network overhead + everything you put in it should be serializable but it will work.
-----Original Message-----
From: An interest list for Sun Java Center J2EE Pattern Catalog [mailto:J2EEPATTERNS-INTEREST@JAVA.SUN.COM]On Behalf Of Mall, Vishnu (Cognizant)
Sent: Thursday, December 02, 2004 8:08 AM
To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM
Subject: Re: Singleton in clustered environment

Hi Varun,
 
The Concept of Singleton is "one and only one instance of a class at any given point of time in a single JVM". The moment you mention a clustered environment, you would end up having multiple JVMs and hence each JVM would have an instance of this Singleton class. Hope this helps. Do let me know your exact requirement in detail.
 

Thanks and Regards,
Vishnu Mall
Cognizant Technology Solutions,
Technocomplex, Kolkata
Ph : 2357 3211/12/13 Extn : 3253
email : MVishnu@cal.cognizant.com

-----Original Message-----
From: Varun Rally, Noida [mailto:varunr@NOIDA.HCLTECH.COM]
Sent: Thursday, December 02, 2004 11:03 AM
To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM
Subject: Singleton in clustered environment

Hi all,

 

I have to implement singleton in clustered environment.

Can somebody, help with some online resource/link or pattern for doing the same.

 

Regards,

Varun Rally

 

==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

Visit us at http://www.cognizant.com
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.