File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts FastHashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts FastHashMap" Watch "Struts FastHashMap" New topic

Struts FastHashMap

Arunkumar Jayavel

Joined: Aug 13, 2001
Posts: 5
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
Ranch Hand

Joined: Dec 02, 2002
Posts: 37
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.

<a href="" target="_blank" rel="nofollow">Struts in Action</a>
I agree. Here's the link:
subject: Struts FastHashMap
It's not a secret anymore!