Moti Asayag has posted comments on this change.

Change subject: engine: Replace deprecated access to ResourceManager
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.ovirt.org/#/c/38524/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/transport/ProtocolDetector.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/transport/ProtocolDetector.java:

Line 27: public class ProtocolDetector {
Line 28: 
Line 29:     private Integer connectionTimeout = null;
Line 30:     private Integer retryAttempts = null;
Line 31:     private final ResourceManager resourceManager;
> cant you inject the resource manager here?
not straightforward. If wishes, there is a need to wrap each ProtocolDetector 
instantiate with injection of its member via a call to:

  Injector.injectMembers(detector);

so it would be better to have factory for that class which raises more 
complexity.

or via this change in c'tor:
  this.resourceManager = Injector.get(ResourceManager.class);

The resourceManager is injected to the commands, so it make sense to reuse it 
instead of querying instance from the jndi, when possible, unless there is a 
good reason for injecting explicitly.
Line 32: 
Line 33:     private VDS vds;
Line 34: 
Line 35:     public ProtocolDetector(VDS vds, ResourceManager resourceManager) {


-- 
To view, visit https://gerrit.ovirt.org/38524
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie78fff7c5be5998bd9c769cbefa99317ac590b89
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.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

Reply via email to