ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2014/04/01
Mohd shahnawaz khan
من قبل 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
من قبل 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.

المزيد من الأسئلة المماثلة