Forums Register Login

Usage of Servlet instance

+Pie Number of slices to send: Send
From Servlet Spec.2.3


For a servlet not hosted in a distributed environment (the default), the servlet container must use only one instance per servlet declaration


Why it is using MUST?.I think we can have pool of instances per servlet declaration.
Bye.
Viki.
+Pie Number of slices to send: Send
This is a spec and as a container provider you must obey it. Do You want to have your pool of servlets go ahead u r not a container provider
+Pie Number of slices to send: Send
While I don't know the philosophy behind this but if I were to make an educated guess, I would say this restriction is placed inorder to enforce the multi-thread principles of Servlets. Have only ONE instance and create a seperate thread for each request.
- satya
It's a tiny ad. At least, that's what she said.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 432 times.
Similar Threads
Calling init()
Servlet instances
Parameterizing a Servlet in web.xml and Running Instances
Servlet Lifttime
Servlet init()
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:53:21.