Daniel Erez has uploaded a new change for review.

Change subject: core: set cmdContext sessionId on CommandBase ctr
......................................................................

core: set cmdContext sessionId on CommandBase ctr

Set session ID on CommandContext at CommandBase constructor
when not available. Needed for SEAT mechanism since session ID
is available only on parameters upon command re-instantiation
(when moving between task handlers).

Change-Id: I99bfbf7af491ec01e2dcc7d18b27c84d881c241f
Bug-Url: https://bugzilla.redhat.com/1159632
Bug-Url: https://bugzilla.redhat.com/1148495
Signed-off-by: Daniel Erez <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/34770/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 90a09bd..1f79669 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -174,6 +174,10 @@
             cmdContext =
                     new CommandContext(new 
EngineContext().withSessionId(parameters.getSessionId()))
                             .withExecutionContext(new ExecutionContext());
+        } else if (cmdContext.getEngineContext().getSessionId() == null) {
+            // Needed for SEAT mechanism - session ID is available only on 
parameters
+            // upon command re-instantiation (when moving between task 
handlers).
+            
cmdContext.getEngineContext().withSessionId(parameters.getSessionId());
         }
         this.context = cmdContext;
         _parameters = parameters;


-- 
To view, visit http://gerrit.ovirt.org/34770
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99bfbf7af491ec01e2dcc7d18b27c84d881c241f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to