Although it is not commonly done, what will you do if you want to have multiple instances of Servlet in memory and if they have to share the execution of a user request ? (a) Defnie Single Thread model (b) Cannot be done

Showing Answers 1 - 3 of 3 Answers

chandra

  • Jun 19th, 2005
 

answer a

  Was this answer useful?  Yes

Santh kumar

  • Sep 26th, 2006
 

 If a class or servlet implements SingleThreadModel interface,it depends on the server which technology is implemented.

for server there r 2 options. .......1)Multiple Instances

                                            2) Request serialization

 if it(server) follows 1st choice,it creates multiple instances for each servlet and then processes the incoming requests.

if it follows 2nd choice,it creates single instacne for each servlet and then allows only one servlet to be get processed or handle requests. if more than one request came at once, it queues up requests or let them(requests) wait until earlier requests processed.

  with regards,

    santh

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions