| Author |
Are struts action classes thread safe?
|
Saathvik Reddy
Ranch Hand
Joined: Jun 03, 2005
Posts: 228
|
|
Hi, Could any one justify why struts action classes are/aren't thread safe? Thanks,
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56521
|
|
|
They're thread-safe if you write them to be so. Write them to not be thread-safe and they won't be.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26489
|
|
Struts (1) action classes are not thread safe in that they are essentially singletons. Therefore non-thread safe classes and state should not be stored in instance variables. If you don't maintain state, the classes are thread safe. (Which is what I think Bear was getting at.)
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Are struts action classes thread safe?
|
|
|