Meaningless Drivel is fun!*
The moose likes Struts and the fly likes instances of an action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "instances of an action class" Watch "instances of an action class" New topic
Author

instances of an action class

V Bunny
Greenhorn

Joined: Dec 31, 2007
Posts: 20
Hi All

In multiple user, requests scenario, how many instances of an action class (of Struts) get created?
V Bunny
Greenhorn

Joined: Dec 31, 2007
Posts: 20
Hi All,
Please clear my doubt

Is Struts Action class thread safe? If NO or Yes. Why?
DN Debed
Greenhorn

Joined: Nov 03, 2008
Posts: 10
here's a link that would give you the answer.

http://struts.apache.org/1.x/userGuide/building_controller.html

and to answer it too, struts action are thread safe as long as you declare your variables locally.

im not sure with regards to multiple users but from what i understand, only one instance of the action class is created. And this instance is shared by all users.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: instances of an action class
 
Similar Threads
Action class instance
Action class constructor - is it called every time ,,,,,,
Struts Action class
multiple instance of Action class
Problem in Struts 2 when run multiple threads concurrently