Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Is an Action class object of Struts 1.x is a thread safe or not ? Can we make an Action class object as a thread safe object or not ?

user-image
Question added by Deleted user
Date Posted: 2014/04/01
Mohd shahnawaz khan
by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution

In struts1.x front controller is ActionServlet. Each action class is a singleton class, so Action class object is not a thread safe, we need to make it as thread safe by applying synchronization

Haroon Idrees
by Haroon Idrees , Senior Software Engineer , Etilize (Pvt) Ltd. (A GFK Company)

No, struts1 maintain action classes objects as instance pool thats why it is not thread safe.  you also  can't make action classs as thread safe. So don't use instance properties in action classes , use formbean instead.

More Questions Like This