ook is good, and the
o'reilly threads book is good.
--mikej
-=-
mike jackson
[EMAIL PROTECTED]
-----Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 12:26 PM
To: Tomcat Users List
Subject: Re: about singletons (ot)
So you mean that the
e mentioned by other people, the addison westley book is good, and the
o'reilly threads book is good.
--mikej
-=-
mike jackson
[EMAIL PROTECTED]
> -Original Message-----
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 12:26 PM
> To: Tomcat U
Basically yes. Much less code than you normally would think needs to be
declared synchronized. Maybe someone can post a link to a good guide to
thread synchronization - personally I only can recommend the O'Reilly Java
Thread book but that's personal taste(!)
How about Concurrent Programming
quot;Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 9:26 PM
Subject: Re: about singletons (ot)
> So you mean that the original author (mike jackson) was saying that he
> used synchronized code blocks to apply a finer level of detail in
> specifying what
thod body ... )?
>
>
> Cheers
> Tobi
>
>
>
> From: "Erik Price" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 29, 2003 1:46 PM
> Subject: Re: about singletons (ot)
>
>
>
, I mean the overhead from the method
call, not the execution speed of the method body ... )?
Cheers
Tobi
From: "Erik Price" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 1:46 PM
Subject: Re: about singletons (ot)
ROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 1:46 PM
Subject: Re: about singletons (ot)
>
>
> Mike Jackson wrote:
> > The difference is that if you use a singleton there's one instance. If
> > everything
> >
Mike Jackson wrote:
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 do
That would depend on if the constructor actually *does* something.
If it needs to set up a connection pool, parse an XML configuration file, or
whatever, then you have the choice of,
- doing this once, reliably, in the constructor, or
- making sure that every single last static method checks to s
Although possible it has several drawbacks.
- Singletons that are just a class will never
be garbage collected. Instance singletons can
be, as soon as there is no reference to it.
- If you want to pass that singleton around, you loose
typesafty. (The singleton is just instance of
ja
ED]]
> 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
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 d
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 m
Did someone say Booch utility?
http://www.javaworld.com/javaworld/jw-04-1999/jw-04-toolbox.html
see page 2. Actually, this entire set of articles on threading is excellent.
Felipe Schnack wrote:
These days I was thinking
It's not so uncommon to have uses for singleton classes in our
everyda
On Tuesday 28 January 2003 22:56, Felipe Schnack wrote:
> 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
> getInstan
15 matches
Mail list logo