Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Utilisateur supprimé
Date de publication: 2014/04/01
Mohd shahnawaz khan
par 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
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?