]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java
Adapt to changes in Argeo Commons
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / execution / ExecutionScope.java
index 3c7cd45248db1afa7551c50992d78e0ca0ebb22d..3605d03a31892893464edded4395f3158f857e2c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ * Copyright (C) 2007-2012 Mathieu Baudier
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.argeo.slc.core.execution;
 
 import org.apache.commons.logging.Log;
@@ -27,6 +26,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 +141,8 @@ public class ExecutionScope implements Scope {
                throw new UnsupportedOperationException();
        }
 
+       public Object resolveContextualObject(String key) {
+               return executionContext.get().getVariable(key);
+       }
+
 }