This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 actions and thread safety Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 actions and thread safety" Watch "Struts 2 actions and thread safety" New topic
Author

Struts 2 actions and thread safety

Priety Sharma
Ranch Hand

Joined: Jun 10, 2008
Posts: 156

Are the struts 2.x actions thread safe?

Priety.
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
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.
 
GeeCON Prague 2014
 
subject: Struts 2 actions and thread safety