velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Brisson <>
Subject Re: How to make #for thread-safe?
Date Sun, 09 Apr 2006 15:07:53 GMT
Le vendredi 07 avril 2006 à 21:27 -0700, Nathan Bubna a écrit :
> > It would also preclude putting any singletons into the context.
> it precludes putting any *mutable* singletons in the context, and
> that's a good thing!  i don't think mutable singletons are ever a good
> idea, especially in a threaded application like a webapp.  they have
> big thread-safety issues.  this will be true whether you use ASP, JSP,
> Velocity, or any other view technology.
> immutable singletons, on the other hand, are always thread safe in any
> application.  some people still don't like them, but they won't have
> thread-safety issues.

Isn't "mutable singleton" just a nice name for an ugly hack where you
want a singleton to not anymore be a singleton ?


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

View raw message