In struts framework, it seems there is only one servlet class (ActionServlet) to handle the doGet/doPost() from the form, isn't it?
Then the issue is if there are many clients visit the system at the same time, will the servlet become the bottle neck of the system? Is servlet class has only one instants in servlet engine?
Thx for you response.
-
an issue about struts (2 messages)
- Posted by: Liz Li
- Posted on: January 20 2003 04:42 EST
Threaded Messages (2)
- an issue about struts by Chuck Cavaness on January 20 2003 09:02 EST
- an issue about struts by Shivashankar Krishnan on January 21 2003 07:18 EST
-
an issue about struts[ Go to top ]
- Posted by: Chuck Cavaness
- Posted on: January 20 2003 09:02 EST
- in response to Liz Li
There is a single instance of the ActionServlet in most Struts applications. However, it does not become a bottleneck because the servlet is multi-threaded and can handle many, many clients simultaneously. This is what differentiates traditional cgi applications from servlets. That is, servlets create a seperate thread for each client, rather than a heavyweight process.
In short, multiple clients can be executing within the serlvet at the same time. They must however be careful to ensure that they are thread-safe, which generally means not containing instance variables that are client-specific.
So, using a single instance of the Struts ActionServlet isn't an issue and you don't need to worry about it.
Chuck Cavaness
Author of Programming Jakarta Struts (O'Reilly) -
an issue about struts[ Go to top ]
- Posted by: Shivashankar Krishnan
- Posted on: January 21 2003 07:18 EST
- in response to Chuck Cavaness
Struts definitely reduces time of productivity. But considering a large project, the whole project is all cluttered with ActionForms and it becomes tough to manage. That is a primary concern. Regd. session, if you are using too much of it you have to handle session properly lest struts may add too much of unwanted info into the session
shiva