tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: about singletons (ot)
Date Wed, 29 Jan 2003 12:46:09 GMT

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 don't mean synchronized methods, but synchronized
> code
> blocks) to control threads using that resource.

Why could you not use synchronized methods?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message