Uploaded image for project: 'XWork'
  1. XWork
  2. XW-814

Initialize/create OGNL ValueStack before instantiating the Action

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta2
    • 1.0
    • Configuration
    • None

    Description

      PicoContainer (http://www.picocontainer.org) needs access to the ValueStack in order to put together the container to resolve Type3 (constructor based) dependencies defined as constructor arguments. When instantiating, it will look through the tree of containers trying to resolve all dependencies. Since DefaultActionInvocation only initializes/creates the ValueStack after the action is created (createContextMap), PicoContainer will throw a NPE when accessing it.

      Attached is the patch which initializes/creates the stack before createAction is called. Only pushing the action and actioninvocation onto the stack were moved out of the protected createContextMap method. I'm not sure what this means in terms of portability, but I see no problems.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pathos Mathias Bogaert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: