This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!