Java is not slow on server-side!

I know I've been in the field for quite sometime now... However, over and over I get to ask myself the question how many servlet instance is created in the container? At first I thought that multiple instances are created for each user and then reused over and over again... I was wrong...

Only one instace of a Servlet is created but multiple threads are created for each user to access it.

Another question came into my mind... How about static fields?

Well unless an object is synchronized, I guess both static and non-static fields are not thread safe. I dunno what effect synchronizing an objet will have on the application... I'm really not that good with multithreading(yet, but I'm working on it).

So how can other people say that Java is slow as a server-side programming language when only one servlet instance is created? Well... I have to say... Blame it to those model 1 developers who code in straight JSP (you *@#$3#@424!!!). FYI, JSP's are compiled at runtime so putting the business logic in it will really make your app slooowww...

Hmmm... It was quite a relief having to know how my container works...
Published 09-21-2006 4:34 AM by lamia
Filed under: , ,