Link to home
Start Free TrialLog in
Avatar of Torus
Torus

asked on

servlet concept

I have asked some people and they said that JVM can only process one thread at a time, if the servlet needs to handle multiple requests simultanously or several servlet run simultanously,Thread.currentThread().yield() should be used. As I read several books, they never mention to use Thread.currentThread.yield() to handle multiple requests. On the contrast, they teach how to use synchronized word to make sure thread-safe. Then, is it greatly dependent on the servlet engine spawn threads for you?
if not, Thread.currentThread.yield() should be used in this case?
Also, JDK1.3's JVM still can only have one thread at a time?



ASKER CERTIFIED SOLUTION
Avatar of terajiv
terajiv

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Torus
Torus

ASKER

oh! how come!? I have deleted the question. Don't know why it still exists.
Actually, my question is wrong. If only one thread could run in JVM at a time, I think Java had no multi-threading concept. So the sentences I got is totally wrong. That why I deleted the question.

What I want to ask is a process. As I know, netscape VM and Microsoft VM only allows one process at a time
Java VM can run multiple processes at a time, right?

Yes... Right...