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/04 03:07:11 UTC
git commit: updated refs/heads/4.3 to 29aa7c2
Updated Branches:
refs/heads/4.3 22a1b8c3f -> 29aa7c272
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/29aa7c27
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/29aa7c27
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/29aa7c27
Branch: refs/heads/4.3
Commit: 29aa7c272cbf5ae7beb7e201d912979e62cae220
Parents: 22a1b8c
Author: Kelven Yang <ke...@gmail.com>
Authored: Fri Jan 3 18:05:31 2014 -0800
Committer: Kelven Yang <ke...@gmail.com>
Committed: Fri Jan 3 18:05:31 2014 -0800
----------------------------------------------------------------------
.../cloudstack/framework/jobs/AsyncJobExecutionContext.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/29aa7c27/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 2481145..e9bdae2 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;
}