Win a copy of The Java Performance Companion this week in the Performance forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic