Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3407

Convention plugin eager-loads spring components upon initialization of convention configuration

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.8.1, 2.2.1
    • Fix Version/s: 2.2.1
    • Component/s: Plugin - Convention
    • Labels:
      None
    • Environment:

      spring 2.5+

    • Flags:
      Patch

      Description

      Our action classes have their life cycle managed by spring, and they are /request/ scoped. When the convention plugin initializes the struts configuration it tries to initialize the spring beans. This does work because "request" scope does not exist at the time the struts config is created.

      The enclosed patch simply removes the eager-loading since it is only done as an optimization (and maybe eager early consistency check). It would be possible to make this a flag although I really think the default should be "off"; the "off" behavior is consistent with behavior of "older" struts technologies in this respectearlier struts versions..

        Attachments

        1. strutsConventionEagerloading.patch
          1 kB
          Kristian Rosenvold

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              krosenvold Kristian Rosenvold
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: