Re: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
> > Sent: Wednesday, February 05, 2003 4:05 AM > > Subject: RE: singleton creation (ot) > > > > I'm not sure yet of how I will do it... I would not like to > > synchronize the entire method because it'll probably be called million > > of times

Re: singleton creation (ot)

2003-02-05 Thread Will Hartung
> From: "Felipe Schnack" <[EMAIL PROTECTED]> > Sent: Wednesday, February 05, 2003 4:05 AM > Subject: RE: singleton creation (ot) > I'm not sure yet of how I will do it... I would not like to > synchronize the entire method because it'll probably be

Re: Re[2]: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
ts that the > FS> semantics > >> of volatile have been changed to make double-checked locking work. > >> > >> I'd love to hear different, or if anyone is aware of anything upcoming > FS> to > >> make the issue more obvious/go away... > >>

Re[2]: singleton creation (ot)

2003-02-05 Thread Jacob Kjome
rent, or if anyone is aware of anything upcoming FS> to >> make the issue more obvious/go away... >> >> > -Original Message- >> > From: Felipe Schnack [mailto:[EMAIL PROTECTED]] >> > Sent: 05 February 2003 12:06 >> > To: [EMAIL PROTECTE

RE: singleton creation (ot)

2003-02-05 Thread Robert Priest
: singleton creation (ot) Very nice reading, but I'm getting convinced that I should not use Singleton pattern in my case... I just wonder what should I do then :-) As I said, the method will be called millions of times... so I think it shouldn't be synch'd (for performance). Certainl

RE: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
; > > -Original Message- > > From: Felipe Schnack [mailto:[EMAIL PROTECTED]] > > Sent: 05 February 2003 12:06 > > To: [EMAIL PROTECTED]; Tomcat Users List > > Subject: RE: singleton creation (ot) > > > > > > Hmm... nice links! > > The

RE: singleton creation (ot)

2003-02-05 Thread Daniel Brown
'd love to hear different, or if anyone is aware of anything upcoming to make the issue more obvious/go away... > -Original Message- > From: Felipe Schnack [mailto:[EMAIL PROTECTED]] > Sent: 05 February 2003 12:06 > To: [EMAIL PROTECTED]; Tomcat Users List > Subje

RE: singleton creation (ot)

2003-02-05 Thread Felipe Schnack
s/collect > ions/FastTreeMap.html > > (apologies for the wrap). > > Dan. > > > -Original Message- > > From: Felipe Schnack [mailto:[EMAIL PROTECTED]] > > Sent: 05 February 2003 11:21 > > To: Tomcat Users List > > Subject: singleton creation (ot) > >

RE: singleton creation (ot)

2003-02-05 Thread Daniel Brown
Users List > Subject: singleton creation (ot) > > > I was wondering... this code is valid to avoid excessive use of > synchronized code? I think so, but we never know :-) > This is the default getInstance() method of a singleton (simplified): > > public Object getInstance(

singleton creation (ot)

2003-02-05 Thread Felipe Schnack
I was wondering... this code is valid to avoid excessive use of synchronized code? I think so, but we never know :-) This is the default getInstance() method of a singleton (simplified): public Object getInstance() { if (INSTANCE == null) { synchronized (this) { if (INSTANCE