  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Singleton in clustered environment | Singleton in clustered environment 2004-12-02 - By SOURABH Srivastava
Back Varun, There are some products available which manages cache data in a single JVM. All other JVM's can access data from that single jvm. Thanks, Sourabh
-- --Original Message-- -- From: An interest list for Sun Java Center J2EE Pattern Catalog [mailto :J2EEPATTERNS-INTEREST@(protected)]On Behalf Of ashraf galal Sent: Thursday, December 02, 2004 3:13 PM To: J2EEPATTERNS-INTEREST@(protected) Subject: Re: Singleton in clustered environment
you can implement this functionality using the database i n one JVM and direct the others to read it from there or replicate this database table to the other JVMs too.
Ashraf Galal (416)804-8359 >From: "Varun Rally, Noida" <varunr@(protected)> >Reply-To: An interest list for Sun Java Center J2EE Pattern Catalog <J2EEPATTERNS-INTEREST@(protected) .COM> >To: J2EEPATTERNS-INTEREST@(protected) >Subject: Re: Singleton in clustered environment >Date: Thu, 2 Dec 2004 14:39:58 +0530 > >My requirement is that I need only one single instance for the whole >application in clustered environment. > >i.e. even if there are more than one JVMs , all of them should access single >instance. > > > >Exact requirement is that we have a class that handles the locking >functionality of documents in our > >Application. We create only one singleton object of this class and this >object maintains a map of locked documents. > > > >Now, in clustered environment, there will be more than one JVMs and hence >more than one objects that are handling > >The locking information, which is actually wrong. > > > >I hope I am clear in my words. > >Waiting for your reply. > >Thanks and regards > > > >Varun Rally > > > > > > > > __ __ > >From: An interest list for Sun Java Center J2EE Pattern Catalog > [mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Tubman Aharon >Sent: Thursday, December 02, 2004 1:52 PM >To: J2EEPATTERNS-INTEREST@(protected) >Subject: Re: Singleton in clustered environment > > > >I agree with Mall. It is bad practice to access singleton remotely. Can you >describe the meter of you problem? Which kind of service it provides? > > > > __ __ > >From: An interest list for Sun Java Center J2EE Pattern Catalog >[mailto:J2EEPATTERNS-INTEREST @(protected)] On Behalf Of Mall, Vishnu >(Cognizant) >Sent: Thursday, December 02, 2004 8:08 AM >To: J2EEPATTERNS-INTEREST@(protected) >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@(protected) .cognizant.com > >-- --Original Message-- -- >From: Varun Rally, Noida [mailto :varunr@(protected)] >Sent: Thursday, December 02, 2004 11:03 AM >To: J2EEPATTERNS-INTEREST@(protected) >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@(protected) > > > >???????? ?? ????? ??????? ???? ???????? ??? ?????? ?????? ???? ???? ????? ? >???? ??? ????? ?????? ?/?? ?????? ????? ?/?? ?????? ?????? ?/?? ??? ???? ??? >???? ????? ????? ?????? ?????? ????? > >Correspondence with Leumi by electronic mail is for general purposes only >and may not be relied upon for the purpose of effecting any activities >and/or transactions whatsoever and/or as a substitute for advice and/or in >any other manner and is subject to the conditions of use which have been >provided to the Customer > > > > > >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@(protected) >=================================================== ================= >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@(protected) > >=========== ========================================================= >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@(protected) ==================================================================== 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@(protected)
Confidentiality Statement:
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by return email.
==================================================================== 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@(protected)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=402004709-02122004><FONT face=Arial color=#000080 size=2>Varun,</FONT></SPAN></DIV> <DIV><SPAN class=402004709-02122004><FONT face=Arial color=#000080 size=2></FONT></SPAN> </DIV> <DIV><SPAN class=402004709-02122004><FONT face=Arial color=#000080 size=2>There are some products available which manages cache data in a single JVM. All other JVM's can access data from that single jvm.</FONT></SPAN></DIV> <DIV><SPAN class=402004709-02122004><FONT face=Arial color=#000080 size=2></FONT></SPAN> </DIV> <DIV><SPAN class=402004709-02122004><FONT face=Arial color=#000080 size=2>Thanks,</FONT></SPAN></DIV> <DIV><SPAN class=402004709-02122004><FONT face=Arial color=#000080 size=2>Sourabh</FONT></SPAN></DIV> <BLOCKQUOTE> <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> An interest list for Sun Java Center J2EE Pattern Catalog [mailto:J2EEPATTERNS-INTEREST@(protected)]<B>On Behalf Of </B>ashraf galal<BR><B>Sent:</B> Thursday, December 02, 2004 3:13 PM<BR><B>To:</B> J2EEPATTERNS-INTEREST@(protected)<BR><B>Subject:</B> Re: Singleton in clustered environment<BR><BR></FONT></DIV> <DIV> <P>you can implement this functionality using the database i n one JVM and direct the others to read it from there or replicate this database table to the other JVMs too.<BR><BR></P><BR><BR><BR> <DIV>Ashraf Galal <BR>(416)804-8359</DIV>>From: "Varun Rally, Noida" <varunr@(protected)> >Reply-To: An interest list for Sun Java Center J2EE Pattern Catalog <J2EEPATTERNS-INTEREST@(protected)> >To : J2EEPATTERNS-INTEREST@(protected) >Subject: Re: Singleton in clustered environment >Date: Thu, 2 Dec 2004 14:39:58 +0530 > >My requirement is that I need only one single instance for the whole >application in clustered environment. > >i.e. even if there are more than one JVMs , all of them should access single >instance. > > > >Exact requirement is that we have a class that handles the locking > ;functionality of documents in our > >Application. We create only one singleton object of this class and this >object maintains a map of locked documents. > > > >Now, in clustered environment, there will be more than one JVMs and hence >more than one objects that are handling > >The locking information, which is actually wrong. > > > >I hope I am clear in my words. > >Waiting for your reply. > >Thanks and regards > > > >Varun Rally > > > > > > > > __ __ > >From: An interest list for Sun Java Center J2EE Pattern Catalog >[mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Tubman Aharon >Sent: Thursday, December 02, 2004 1:52 PM >To: J2EEPATTERNS-INTEREST@(protected) >Subject: Re: Singleton in clustered environment > > > >I agree with Mall. It is bad practice to access singleton remotely. Can you >describe the meter of you problem? Which kind of service it provides? > > > > __ __ > >From: An interest list for Sun Java Center J2EE Pattern Catalog >[mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Mall, Vishnu >(Cognizant) >Sent: Thursday, December 02, 2004 8:08 AM >To: J2EEPATTERNS-INTEREST@(protected) >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@(protected) > >-- --Original Message-- -- >From: Varun Rally, Noida [mailto:varunr@(protected)] >Sent: Thursday, December 02, 2004 11:03 AM >To: J2EEPATTERNS-INTEREST@(protected) >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@(protected) > > > >???????? ?? ????? ??????? ???? ???????? ??? ?????? ?????? ???? ???? ?????? >???? ??? ????? ?????? ?/?? ?????? ????? ?/?? ?????? ?????? ?/?? ??? ???? ??? >???? ????? ????? ?????? ?????? ????? > >Correspondence with Leumi by electronic mail is for general purposes only >and may not be relied upon for the purpose of effecting any activities >and/or transactions whatsoever and/or as a substitute for advice and/or in >any other manner and is subject to the conditions of use which have been >provided to the Customer > > > > > >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@(protected) >==================================================================== >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@(protected) > >==================================================================== >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@(protected) </DIV>==================================================================== 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@(protected) </BLOCKQUOTE>Confidentiality Statement:<br><br>This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by return email.<br></BODY></HTML> ==================================================================== 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@(protected)
|
|
 |