tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <brenmcgu...@tariffenet.it>
Subject Re: Servlet inter-communication
Date Thu, 04 May 2006 07:22:03 GMT
Leon Rosenberg ha scritto:
> Hmm... instead of using a 3-liner I'm supposed to plug in a whole
> container, even a lightweight one? What will come next? Installing
> Jboss for config-file-reading?
>

You know; i really liked singleton when I used to be a Swing programmer. 
But it raises a serious issue for web applications when you reload them.
This is not a Tomcat bug, it is a GC "bug" or "feature" or whatever else.
Some people think that Singleton is an anti-pattern and that it is 
better to use single instances of a normal class, stored somewhere that 
it is reachable everywhere, such as a container. When I noticed Spring 
and IoC, I joined those people.
You know, if you have a very small webapp, singletons are still useful. 
But if you have a mid-sized or a giant webapp, Spring comes in handy.
Just my 2 eurocents.
Ciao
Antonio

P.S. When I say Spring I mean an IoC container of your choice. I wrote 
"Spring" only because it is the only one I know well.

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


Mime
View raw message