Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is Struts Action class Thread Safe?

Answer Posted / vijay

Struts 1 Actions are singletons and must be thread-safe
since there will only be one instance of a class to handle
all requests for that Action. The singleton strategy places
restrictions on what can be done with Struts 1 Actions and
requires extra care to develop. Action resources must be
thread-safe or synchronized.


Struts 2 Action objects are instantiated for each request,
so there are no thread-safety issues. (In practice, servlet
containers generate many throw-away objects per request, and
one more object does not impose a performance penalty or
impact garbage collection.)

Is This Answer Correct ?    53 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the differences between struts1 and struts2?

934


What are action errors?

982


Explain struts?

1036


What is spring hibernate and struts in java?

909


What are pull and push mvc architecture and which architecture does struts2 follow?

927


What is the role of action class?

1036


Explain the life cycle of a request in struct2 application?

902


What is the purpose of @key annotation annotation?

1072


What’s the difference between struts and espresso?

992


How does struts2 token work?

973


What are the pros of struts 2?

971


What are the two types of validations supported by validator framework?

1020


What are the advantages of spring mvc over struts mvc?

922


What is struts and why it is used?

960


What are the various struts tag libraries?

935