Commits

rainerh  committed 8278ae0

Removing old portlet impl workarounds
Issue number:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@769e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits a60431b

Comments (0)

Files changed (2)

File src/java/com/opensymphony/xwork/ActionGlobalContext.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-package com.opensymphony.xwork;
-
-import com.opensymphony.xwork.util.OgnlValueStack;
-
-import java.io.Serializable;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:hu_pengfei@yahoo.com.cn">Henry Hu</a>
- * @since 2005-7-6
- */
-public class ActionGlobalContext implements Serializable {
-
-    static ThreadLocal actionGlobalContextThreadLocal = new ActionGlobalContextThreadLocal();
-
-    Map mapContext;
-
-    private static class ActionGlobalContextThreadLocal extends ThreadLocal {
-        private ActionGlobalContextThreadLocal() {
-        }
-    }
-
-    public ActionGlobalContext(Map mapContext) {
-        this.mapContext = mapContext;
-    }
-
-    public static void setContext(ActionGlobalContext actionGlobalContext) {
-        actionGlobalContextThreadLocal.set(actionGlobalContext);
-    }
-
-    public static ActionGlobalContext getContext() {
-        ActionGlobalContext actionGlobalContext = (ActionGlobalContext) actionGlobalContextThreadLocal.get();
-
-        if (actionGlobalContext == null) {
-            OgnlValueStack vs = new OgnlValueStack();
-            actionGlobalContext = new ActionGlobalContext(vs.getContext());
-            actionGlobalContextThreadLocal.set(actionGlobalContext);
-        }
-
-        return actionGlobalContext;
-    }
-
-    public Object get(Object key) {
-        return mapContext.get(key);
-    }
-
-    public void set(Object key, Object value) {
-        mapContext.put(key, value);
-    }
-
-    public void setActionExecuted(String actionExecuted) {
-        set("Executed", actionExecuted);
-    }
-
-    public String getActionExecuted() {
-        return (String) get("Executed");
-    }
-
-}

File src/java/com/opensymphony/xwork/DefaultActionProxy.java

     }
 
     public String execute() throws Exception {
-        ActionContext nestedContext = null;
-
-        String executed = ActionGlobalContext.getContext().getActionExecuted();
-//        if (executed != null) {
-            nestedContext = ActionContext.getContext();
-//        }
-
+        ActionContext nestedContext = ActionContext.getContext();
         ActionContext.setContext(invocation.getInvocationContext());
 
         String retCode = null;
 
         try {
             retCode = invocation.invoke();
-            ActionGlobalContext.getContext().setActionExecuted("Executed");
         } finally {
-//            if (cleanupContext && executed != null) {
             if (cleanupContext) {
                 ActionContext.setContext(nestedContext);
             }