Commits

tschneider22  committed 7eb66bd

XW-1370 - applied patch that returns non-singleton instances of actions, validators, etc.

Submitted By: Konstantin Pribluda
Reviewed By: Tom Schneider

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2836573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits ed5adfe

Comments (0)

Files changed (1)

File src/java/com/opensymphony/webwork/pico/PicoObjectFactory.java

  *****************************************************************************/
 package com.opensymphony.webwork.pico;
 
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.nanocontainer.nanowar.ActionsContainerFactory;
+import org.picocontainer.MutablePicoContainer;
+import org.picocontainer.defaults.DefaultPicoContainer;
+import org.picocontainer.defaults.ObjectReference;
+
 import com.opensymphony.xwork.ObjectFactory;
 import com.opensymphony.xwork.Result;
-import com.opensymphony.xwork.validator.Validator;
-import com.opensymphony.xwork.interceptor.Interceptor;
+import com.opensymphony.xwork.config.ConfigurationException;
 import com.opensymphony.xwork.config.entities.ActionConfig;
 import com.opensymphony.xwork.config.entities.InterceptorConfig;
 import com.opensymphony.xwork.config.entities.ResultConfig;
-import com.opensymphony.xwork.config.ConfigurationException;
-import org.nanocontainer.nanowar.ActionsContainerFactory;
-import org.picocontainer.MutablePicoContainer;
-import org.picocontainer.defaults.ObjectReference;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.Map;
+import com.opensymphony.xwork.interceptor.Interceptor;
+import com.opensymphony.xwork.validator.Validator;
 
 /**
  * <p>
 
         if (action == null) {
             // The action wasn't registered. Attempt to instantiate it.
-            actionsContainer.registerComponentImplementation(actionClass);
-            action = actionsContainer.getComponentInstance(actionClass);
+            MutablePicoContainer container = new DefaultPicoContainer(actionsContainer);
+            container.registerComponentImplementation(actionClass);
+            action = container.getComponentInstance(actionClass);
         }
         return action;
     }