• Post Reply Bookmark Topic Watch Topic
  • New Topic

instances of an action class

 
V Bunny
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

In multiple user, requests scenario, how many instances of an action class (of Struts) get created?
 
V Bunny
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Please clear my doubt

Is Struts Action class thread safe? If NO or Yes. Why?
 
DN Debed
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
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!