tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
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?



Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message