Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

instance of ActionForm

 
padmaratna kamble
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends
. please tell me when 1000 of clients request simultanuously
comes in struts , and 1000 of view page opens, tell me how may instance of ActionForm creates .

also tell me, is instance of ActionForm create after summiting resuest to ServletAction or at the time of framework loading.......
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ActionForm instance is not threaded, so if your server receives 1000 HTML requests, 1000 instances of your ActionForm will be created.

However, if you specify "request" as the scope, each instance is available for garbage collection as soon as the server returns a response to the browser.

If you specify "session", you have only one instance per actual user of the system. If you're using session as the scope for any of your forms, it's wise to take steps to see that they're taken out of session scope as soon as the user moves on to another page. That way, at any given time, there is only one ActionForm per user in the session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic