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 default suffix for struts2 action uri ?

973


How can you create your custom interceptor in struts 2?

951


What is java struts?

947


How can we work with error tags?

994


What is actionservlet?

1012


What are the pros of struts 2?

977


What do you know about validation plugin ?

963


What design patterns are used in struts?

1013


What helpers in the form of jsp pages are provided in struts framework?

992


What is the purpose of @expressionvalidator annotation?

1062


What is the purpose of @after?

1042


How to build struts application in eclipse?

1001


What is switchaction?

1151


What are the major differences between html tags and strut specific html tags?

935


When do I need “struts.jar” on my classpath?

975