Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts FastHashMap

 
Arunkumar Jayavel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the firsttime the action is invoked the copy of that action instance is stored in the hashmap. Whenever next time the same action is trigered from the hashmap the action is get colned and given to the caller after the job is finished the action object is destroyed. We are not loading the config params again and again apart from this there any other advantage ?
 
Ted Husted
Author
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Action is not cloned or copied per se. The same object is used, but the request passed through on another thread. (The same as a servlet.) This is meant to reduce the overall number of objects used by the application and to forgo another object create.
Under elder JVMs this provided a modest performance optimization, but has become less important using newer JVMs. This behavior is unlikely to change in Struts 1.0.x, but other approaches may be considered in the 2.0.x series.
-Ted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic