Yevgeny Zaspitsky has posted comments on this change. Change subject: core: missing DbFacade instance in VmDeviceutils ......................................................................
Patch Set 3: (1 comment) http://gerrit.ovirt.org/#/c/37914/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java: Line 56: private final static int COMPANION_USB_CONTROLLERS = 3; Line 57: private final static int VNC_MIN_MONITORS = 1; Line 58: private final static int SINGLE_QXL_MONITORS = 1; Line 59: private static OsRepository osRepository = SimpleDependecyInjector.getInstance().get(OsRepository.class); Line 60: private static DbFacade dbFacade = Injector.get(DbFacade.class); I'm not sure if we can use Injector in a static context. I'd prefer that static context wouldn't exist at all. If we change all static method to be non-static ones then make the class a managed singleton bean, inject dbFacade as its dependency and then inject VmDeviceUtils where it's being used that IMHO would be much better. Line 61: private static VmDeviceDAO dao = dbFacade.getVmDeviceDao(); Line 62: Line 63: /** Line 64: * Update the vm devices according to changes made in vm static for existing VM -- To view, visit http://gerrit.ovirt.org/37914 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5d86293bdff3dc5804f672f8ee0eb0756528e360 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches