Roy Golan has posted comments on this change.

Change subject: core: Introduce CDI for Commands dependencies
......................................................................


Patch Set 8:

(1 comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 131:     protected Log log = LogFactory.getLog(getClass());
Line 132: 
Line 133:     @Inject
Line 134:     protected DbFacade dbFacade;
Line 135: 
we should use initializer methods when we want to make the instance immutable.

an injected dbfacade doesn't compromise mutability of the object. if it was a 
VM or some other entity with state, like the ShoppingCart, then we should use 
it.

Thus VdcActionsParamaters are a candidate for injection or a VM 

 class RunVMCommand {
 @Inject
 void RunVmCommand(RunVmParams params)
 }

 

however this doesn't make since, does it

class Command {

 @Inject
 void Command(DbFacade db, Config config, Validator validator .....)

}
Line 136:     /** The context defines how to monitor the command and handle its 
compensation */
Line 137:     private final CommandContext context = new CommandContext();
Line 138: 
Line 139:     /** A map contains the properties for describing the job */


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7f604ff91847b698efe84a09f724ba0492a672c1
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to