|
> From: Walden H. Leverich > > Do I understand "synchronize" correctly? Are you saying that if my servlet > takes, say .1 seconds to run, the first person will be .1 second response > time, but if a second person hit at exactly the same time he would get .2 > second response time (.1 seconds waiting for the first person to > finish then > .1 seconds for the second person to run?) Walden, I can categorically state that servlets are not synchronized by default, and that multiple threads execute the same servlet. If you'd like to prove it to yourself, you can simply try using some local variables in your servlet and watch them get stepped on (this is a painful way to learn, but quite informative). Now, if you don't have enough threads available, then certainly you will begin to backup, but that's not usually the case. Usually, the thread is only in use for the time of the request and then released once the response is returned to the user. However, if you use the persistent connection capability of the newer HTTP specification, it will lock a thread (and a socket, IIRC) for the duration of the conversation, and this can quickly degrade your machine. Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.