The correct answer is indeed given as false. The explanation is also given:
No, the container cannot let multiple threads execute the methods of the same instance at the same time. This is guaranteed by the specification. To support multiple user requests, the container may create multiple instances of this servlet.
I don't see any correct history for this question either. HTH, Paul.
Dear Nazmul, Hi how are you? I remember you were studying for SCPJ2 around same time as me Jan this year. Im just bought Webplus to start prep for exam. Refer to your question - SingleThreadedModel my references state: when your servlet implements this interface - the server queues up all the request threads passing them one at a time to the servlet instance. So the answer is true from this perspective. Regards Stephen SCPJ2
Nazmul Huda Sarkar
posted 16 years ago
Hello Stephen Yes..I do remember you. How are you ? I'm going to sit for SCWCD next 28/30th Sept. Still I have few problems You are right. Servlet container will pass multiple request one by one. But there is only one instance of the servlet..right? May be multiple instance to serve multiple request. But no multiple thread of same servlet instance. So the answer should be false. And "can run multiple threads, however not in the same time.. " ...if so...then what is the advantage of thread Anyway...hope not to face such tricky question
Nazmul<br />SCJP,SCWCD,IBM OOAD with UML
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
professionally read, modify and write PDF files from Java