X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FExecutionScope.java;h=b0bba7bf95933825a202c79602bc47381171773e;hb=a2ecbd2a3eae94576fe4db3d651bc0908245da90;hp=3c7cd45248db1afa7551c50992d78e0ca0ebb22d;hpb=1fdb1b4e7b1d2b0cabb6483238301b857a6392fa;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java index 3c7cd4524..b0bba7bf9 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java @@ -27,6 +27,10 @@ import org.argeo.slc.execution.ExecutionStack; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.config.Scope; +/** + * When Spring beans are instantiated with this scope, the same instance is + * reused across an execution. + */ public class ExecutionScope implements Scope { private final static Log log = LogFactory.getLog(ExecutionScope.class); @@ -138,4 +142,8 @@ public class ExecutionScope implements Scope { throw new UnsupportedOperationException(); } + public Object resolveContextualObject(String key) { + return executionContext.get().getVariable(key); + } + }