WW-3161 Sets proper ActionContext to allow I18N to work (cherry picked from commit f65e38b)
Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/87dfa3f6 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/87dfa3f6 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/87dfa3f6 Branch: refs/heads/master Commit: 87dfa3f6fb44c3191e6ce12dbf3b1ff42bf0cdda Parents: 0ba7965 Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Tue Oct 20 08:40:25 2015 +0200 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Tue Oct 20 08:43:39 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/struts2/interceptor/BackgroundProcess.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/87dfa3f6/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java b/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java index 79ad017..c8061a3 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java +++ b/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java @@ -23,6 +23,7 @@ package org.apache.struts2.interceptor; import java.io.Serializable; +import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; /** @@ -78,6 +79,7 @@ public class BackgroundProcess implements Serializable { * @throws Exception any exception thrown will be thrown, in turn, by the ExecuteAndWaitInterceptor */ protected void beforeInvocation() throws Exception { + ActionContext.setContext(invocation.getInvocationContext()); } /** @@ -88,6 +90,7 @@ public class BackgroundProcess implements Serializable { * @throws Exception any exception thrown will be thrown, in turn, by the ExecuteAndWaitInterceptor */ protected void afterInvocation() throws Exception { + ActionContext.setContext(null); } /**