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

How can duplicate form submission be handled in struts 2?

968


How we can install struts?

960


What is the naming convention for a resource bundle file in struts2?

957


Can you explain custom tag?

961


Give an example of validates method used to avoid errors.

973


What is apache struts vulnerability?

912


Explain about logic match tag?

1038


what is meant by Struts Validator Framework?

985


What is the purpose of form-beans tag in struct-config.xml?

902


What is the difference between struts and spring? Explain

895


For a single Struts application, can we have multiple struts-config.xml files?

961


What is java struts?

909


What is the front controller in struts2?

935


What does modeldriven interceptor?

1061


How does interceptor work in struts2?

934