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 / shrikant kale

ApplicationContoller/RequestProcessor will create & use the
only instance of each Action class [hence: Singleton in
nature] .

Also the Action class has to handle the multiple request
(most of time simultaniously.) so it cant be Thread-Safe.


Hence we must not declare class instance variable in Action
class.If declared so then Action class state becomes non-
thread safe.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is action class? What are the types of action class?

966


What is the purpose of @element annotation annotation?

1086


Which design pattern is implemented by Struts2 interceptors?

1003


How the exceptions are handled in struts?

1010


Why we use struts in java?

928


What is the difference between plain-validator and field-validator?

962


List some struts tag libraries?

951


What is struts.devmode?

1052


What validate() and reset() method does ?

1095


Give an example where struts tiles may be used?

1012


What is role of actionservlet?

1030


What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?

1011


What’s the difference between struts and turbine? What’s the difference between struts and espresso?

989


Which interceptor is responsible for i18n support?

936


What is actioncontext?

952