File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 2 actions thread safe 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 thread safe" Watch "Struts 2 actions thread safe" New topic

Struts 2 actions thread safe

sarada bokka
Ranch Hand

Joined: Jan 13, 2010
Posts: 80

Struts 2 actions are thread safe so for each request it creates a new object.

How come generating one more object does not impose a performance penalty in struts2?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

Creating objects is an insignificant amount of work compare to what the actions do. This "performance penalty" would be negligible.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Struts 2 actions thread safe
It's not a secret anymore!