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 does apache struts do?

954


Can we have more than one struts-config.xml file for a single struts application?

975


How is token generated?

1076


What is struts in java with example?

1001


Can you explain struts.properties in struts2?

1004


Where should struts xml be placed?

986


What is struts2 namespace?

969


Which interceptor is responsible for mapping request parameters to action class Java Bean properties?

1101


What is front controller in struts?

1038


What is the purpose of @urlvalidator annotation?

1024


What are inner class and anonymous class?

1040


Name the different types of actions found in struts.

1048


What is pojo in struts2?

1064


What is the purpose of @stringlengthfieldvalidator annotation?

1148


How can we display all validation errors to user on jsp page?

1119