Ravi Nori has posted comments on this change.

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


Patch Set 8:

(4 comments)

Please fix commit message

....................................................
Commit Message
Line 9: introducing the use of the powerfull yet light weld framework for
Line 10: injecting dependencies to our Command objects.
Line 11: 
Line 12: command object are not EJBs and they have no reason to be ones. Yet 
they
Line 13: can be candidates for CDI beans which means they just need a defualt
replace defualt with default
Line 14: constructor but this doesn't
Line 15: fit into our current code base without refactoring (maybe its posibble
Line 16: at all since paramater object can't be injected?)
Line 17: 


Line 16: at all since paramater object can't be injected?)
Line 17: 
Line 18: To inject dependecies into Command object I hooked into the
Line 19: CommandFactory and used welds
Line 20: framework to create an InjectionTarget on the Command type, and then in
"and then in could" should be "and then it could"
Line 21: could be injected - look at InjectionHelper
Line 22: 
Line 23: next, I used prtoducer methods to signal the weld framework where it
Line 24: should get the instances from, namely which factory method


Line 22: 
Line 23: next, I used prtoducer methods to signal the weld framework where it
Line 24: should get the instances from, namely which factory method
Line 25: to run in order to get a candidte for injection. I took our main EJB,
Line 26: Backend and created the procuder methods there simply by doing:
replace procuder with producer
Line 27: 
Line 28: @Produces
Line 29: public DbFacade getDbFacade() {
Line 30:         return DbFacade.getInstance();


Line 53: QuotaHelper
Line 54: Host selection - inject the selection algorithm to
Line 55: use and provide means for dynmically loading one
Line 56: 
Line 57: -general rule of thumb - concider every use of
concider should be consider
Line 58: getInstance/factory method as candidate for
Line 59: injection
Line 60: 
Line 61: The changes needed to make it work:


-- 
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: Ravi Nori <[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