InterviewSolution
Saved Bookmarks
| 1. |
Explain Struts 1 Classes Are Not Thread Safe Whereas Struts 2 Classes Are Thread Safe? |
|
Answer» STRUTS 1 actions are a singleton. So all THREADS OPERATE on the single action object and hence make it thread-unsafe.Struts 2 actions are not a singleton and a new action object copy are CREATED each time a new action REQUEST is made and hence it threads safe. Struts 1 actions are a singleton. So all threads operate on the single action object and hence make it thread-unsafe.Struts 2 actions are not a singleton and a new action object copy are created each time a new action request is made and hence it threads safe. |
|