I'm a little bit confused. Is the service() a mthod in each thread, or is it just in the servlet instance, and it wakes up a thread whenever there is a transaction ?
Reagrds
SCJP 5 (76%)
SCWCD 5 (86%)
SCBCD 5(70%)
--------------------
"The greatest glory in living lies not in never falling, but in raising every time we fall.".. Nelson Mandela
The service() method is defined in a servlet class. There is only one instance of each servlet in each JVM. When there is a request to the servlet, the container get a thread from the thread pool or create a mew thread for this request and call the service() method of the requested servlet. So the service() method may run parallelly in more than threads.
Is it the servlet who runs the service() method or the container ?
SCJP 5 (76%)
SCWCD 5 (86%)
SCBCD 5(70%)
--------------------
"The greatest glory in living lies not in never falling, but in raising every time we fall.".. Nelson Mandela