In which way Servlet implements multiThread without servlet implement Run
Hi,
In which way Servlet implements multiThread without servlet implement Runnable.
In general servletconaainer use one instance of servlet to handle multiple request(except implement SingleThreadmodal).
Ithing that conatainer can achive this ,in this Way
Myservlet ms;
1st Way:
For each new request container call
new Thread(){
puvlic void run(){
ms.service(request,response);
}
}.start();
but I do not thing in this way we get any performace.
It is better creat pool of Myservelt. and get object from this
ms1,ms2,ms3
2nd way is
Myservlet implement Runnable
and for each request
new Myservlet ().start();
Please tell me In which way conatiner achive multithread of servlet
Siddharth Singh(singhsiddh@yahoo.com)

