Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 actions and thread safety

 
Priety Sharma
Ranch Hand
Posts: 156
Android Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are the struts 2.x actions thread safe?
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, its thread safe, struts2 creates a new instance of the action class for every request that it processes. So unless you've written something special to make an instance of of an action class created by one thread, accessible by another thread, you don't need to worry about other threads modifying the values in your action class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic