Sorry to go into
Java basics but as far as I know there are 2 things when you talk about threads, a Servlet being
Thread Safe, which means even if multiple users try to use same servlet there wont be any clashes for each of these users.
Now if I make my servlet implement SessionSyncronization it means that I am forcing a single user to use a Servlet at a time, in this case wont the 1000 users get a serial access to the 1 instance of the servlet? This will slow down the response, should the container not create multiple instance of the Servlet to cater to all these request then?
Please pardon me if I am worng but this is what I expected the Container to do.
OK I have read over a couple of forums and I accept that my understanding is wrong. I will read what tomcat does and get back to you.
Here are a few links that I can share with you too just FYI, which kind of proves me wrong!
http://www.jguru.com/faq/view.jsp?EID=1041533
BTW what is this tag load-on-startup in the web.xml mean?Does this mean that load so many instances of the servlet? I have normally seen most of the applications have this value as 1.
Thanks in advance.