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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to