[ 
https://issues.apache.org/struts/browse/WW-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Don Brown resolved WW-2611.
---------------------------

    Resolution: Fixed
      Assignee: Don Brown

I'm not sure if this is the best fix, but it seems to work.  Basically, I reset 
the action invocation in a finally block after the action is executed.

> s:action tag leaves invalid ActionInvocation in threadlocal ActionContext
> -------------------------------------------------------------------------
>
>                 Key: WW-2611
>                 URL: https://issues.apache.org/struts/browse/WW-2611
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11.1, 2.1.1
>            Reporter: Jeromy Evans
>            Assignee: Don Brown
>            Priority: Blocker
>             Fix For: 2.1.3
>
>
> This tag sets up a new context and ActionInvocation and invokes the action 
> and result correctly.  The problem is that within that process XWork's 
> DefaultActionInvocation replaces the ActionInvocation in the ThreadLocal 
> ActionContext with the tag's own invocation:
>        // Setting this so that other classes, like object factories, can use 
> the ActionProxy and other
>        // contextual information to operate
>        ActionContext actionContext = ActionContext.getContext();
>        if(actionContext != null) {
>            actionContext.setActionInvocation(this);
>        }
> The effect is that after completion of the tag, the ActionInvocation in the 
> ThreadLocal ActionContext still references the tag's temporary invocation 
> instead of the "parent" action's invocation.  From that point, anything can 
> happen, and does (WW-2079, WW-2290, WW-2599 and TagUtils.buildNamespace).
> I'm not sure how to fix this.  Placing the ActionInvocation into a 
> ThreadLocal goes against the the stack-based architecture of Struts2.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to