Me too, we learn by doing... :) That's also the reason that I follow the pattern as it is stated now, rather than thinking I can make it a little different.
--mikej -=----- mike jackson [EMAIL PROTECTED] > -----Original Message----- > From: Larry Meadors [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 28, 2003 4:09 PM > To: [EMAIL PROTECTED] > Subject: RE: about singletons (ot) > > > I would agree. > > We had a static class and we thought it would work great...it turned out > that we ended up rewriting much of it to use the getInstance() type of > interface - it is just so much more flexible if you *EVER* need to > change stuff. > > Larry > > >>> [EMAIL PROTECTED] 01/28/03 16:08 PM >>> > The difference is that if you use a singleton there's one instance. If > everything > is static then you only have one copy. Usually when you use a singleton > it's to > control access to some resource, the intent is that you use the > singleton > and some > synchronized calls (note I don't mean synchronized methods, but > synchronized > code > blocks) to control threads using that resource. You could probably > implement > a similiar system if everything were static, but I wouldn't want to try > (it's more > work than you think). > > --mikej > -=----- > mike jackson > [EMAIL PROTECTED] > > > -----Original Message----- > > From: Felipe Schnack [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 28, 2003 1:56 PM > > To: Tomcat Users List > > Subject: about singletons (ot) > > > > > > These days I was thinking > > It's not so uncommon to have uses for singleton classes in our > > everyday lives. Normally we do that implementing a class that have its > > constructor as private, so no one can instantiate it, and a > > getInstance() method or something like it. We wouldn't have the same > > kind of behavior if we simply declare all class methods/fields as > > static? > > > > -- > > > > Felipe Schnack > > Analista de Sistemas > > [EMAIL PROTECTED] > > Cel.: (51)91287530 > > Linux Counter #281893 > > > > Centro Universitßrio Ritter dos Reis > > http://www.ritterdosreis.br > > [EMAIL PROTECTED] > > Fone/Fax.: (51)32303341 > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]