CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Anoop Kumar

    MemberNov 20, 2013

    They don't have mutable class objects.
    If action class will have mutable class object then it will be problematic in mutithreading.
    Are you sure? This action cannot be undone.
    Cancel
  • Ajay Pandey

    MemberNov 20, 2013

    My question is how action class in struts2 ensure concurrency(thraed safty)...... I know action class is normal java class.I am working as java developer since last 2 year.Now my application working in multithreaded enviorment and its working fine .But how action class work........?
    Are you sure? This action cannot be undone.
    Cancel
  • Anoop Kumar

    MemberNov 20, 2013

    I don't have access to machine right now.
    I think there is saparate action classes classes are instantiated for each request.
    Can you make a instance variable and keep in loop in execute method. See how it works ?
    But I am sure there only one object cearted for FilterDispature servlet.
    Are you sure? This action cannot be undone.
    Cancel
  • Ajay Pandey

    MemberNov 20, 2013

    thanks ianoop.I highely appreciated ur valuable responce.
    I got answer from my "black book for struts2".Struts 2 Action objects are instantiated for each request, so there are no thread-safety issues.Actually FilterDispature servlet object created wn request maps in web.xml to varify url and call for ActionMapper class.
    Are you sure? This action cannot be undone.
    Cancel
  • Anoop Kumar

    MemberNov 20, 2013

    Yes this is difference between struts 1 and 2 .
    In struts 1 only one object of action will be created.
    Are you sure? This action cannot be undone.
    Cancel
  • micheal john

    MemberNov 28, 2013

    ianoop
    Yes this is difference between struts 1 and 2 .
    In struts 1 only one object of action will be created.

    Guys i'm new to java frameworks please suggest me some main topics to be covered in spring and struct
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register