You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2014/01/09 23:34:01 UTC

[13/13] git commit: updated refs/heads/master to 1e2e1ea

CLOUDSTACK-5752: Use pesudo job context when API dispather directly calls into orchestration flow


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a05d71a8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a05d71a8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a05d71a8

Branch: refs/heads/master
Commit: a05d71a80c16628d8cb15c419c3a794df16ec6ff
Parents: 0965adb
Author: Kelven Yang <ke...@gmail.com>
Authored: Fri Jan 3 18:05:31 2014 -0800
Committer: Kelven Yang <ke...@gmail.com>
Committed: Thu Jan 9 14:29:13 2014 -0800

----------------------------------------------------------------------
 .../cloudstack/framework/jobs/AsyncJobExecutionContext.java      | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a05d71a8/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
index 05b7bf8..f558e01 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
@@ -150,6 +150,10 @@ public class AsyncJobExecutionContext {
 
     public static AsyncJobExecutionContext getCurrentExecutionContext() {
         AsyncJobExecutionContext context = s_currentExectionContext.get();
+        if (context == null) {
+            context = registerPseudoExecutionContext(CallContext.current().getCallingAccountId(),
+                    CallContext.current().getCallingUserId());
+        }
         return context;
     }