Java - Why Struts 1 Classes are not Thread Safe whereas Struts 2 classes are thread safe ?
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2137 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Java - Interview Questions and Answers

 Q1. Why Struts 1 Classes are not Thread Safe whereas Struts 2 classes are thread safe ?
Admin
info@buggybread.com
Ans. Struts 1 actions are singleton. So all threads operates on the single action object and hence makes it thread unsafe.

Struts 2 actions are not singleton and a new action object copy is created each time a new action request is made and hence its thread safe.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   j2ee   mvc frameworks   struts   struts1   struts2   struts 1   struts 2   architecture

Try 1 Question(s) Test


Related Questions

  Do we have form beans in Struts 2 ?
  Action Class is singleton and hence not thread safe in ..




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: