]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/InstantiationManager.java
ParameterRef corrected
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / core / execution / InstantiationManager.java
index 143a8f90e823b0eacdb06b851be50da4984176e8..6a5ee29c9027f1e0ce869f0bae50cee577642aed 100644 (file)
@@ -9,28 +9,31 @@ import org.argeo.slc.execution.ExecutionFlow;
 \r
 public class InstantiationManager {\r
 \r
-       private final static Log log = LogFactory.getLog(DefaultExecutionSpec.class);\r
+       private final static Log log = LogFactory.getLog(InstantiationManager.class);\r
        \r
        private ThreadLocal<Stack<ExecutionFlow> > flowStack = new ThreadLocal<Stack<ExecutionFlow> >();\r
        \r
        public Object createRef(String name) {\r
-               if((flowStack.get() == null) ||  flowStack.get().empty()) {\r
-                       throw new SlcException("No flow is currently initializing."\r
-                                       + " Declare flow refs as inner beans or prototypes.");\r
-               }\r
-\r
-               /*\r
-                * RefSpecAttribute refSpecAttribute = (RefSpecAttribute) attributes\r
-                * .get(name); Class<?> targetClass = refSpecAttribute.getTargetClass();\r
-                * ExecutionTargetSource targetSource = new ExecutionTargetSource(flow,\r
-                * targetClass, name); ProxyFactory proxyFactory = new ProxyFactory();\r
-                * proxyFactory.setTargetClass(targetClass);\r
-                * proxyFactory.setProxyTargetClass(true);\r
-                * proxyFactory.setTargetSource(targetSource);\r
-                * \r
-                * return proxyFactory.getProxy();\r
-                */\r
-               return flowStack.get().peek().getParameter(name);\r
+               \r
+//             if((flowStack.get() == null) ||  flowStack.get().empty()) {\r
+//                     throw new SlcException("No flow is currently initializing."\r
+//                                     + " Declare flow refs as inner beans or prototypes.");\r
+//             }\r
+//\r
+//             /*\r
+//              * RefSpecAttribute refSpecAttribute = (RefSpecAttribute) attributes\r
+//              * .get(name); Class<?> targetClass = refSpecAttribute.getTargetClass();\r
+//              * ExecutionTargetSource targetSource = new ExecutionTargetSource(flow,\r
+//              * targetClass, name); ProxyFactory proxyFactory = new ProxyFactory();\r
+//              * proxyFactory.setTargetClass(targetClass);\r
+//              * proxyFactory.setProxyTargetClass(true);\r
+//              * proxyFactory.setTargetSource(targetSource);\r
+//              * \r
+//              * return proxyFactory.getProxy();\r
+//              */\r
+//             return flowStack.get().peek().getParameter(name);\r
+               \r
+               return getInitializingFlowParameter(name);\r
        }       \r
        \r
        public void flowInitializationStarted(ExecutionFlow flow, String flowName) {\r