Piotr Kliczewski has posted comments on this change.

Change subject: core: cleanup VdsManager dispose
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/32757/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java:

Line 717:     public void dispose() {
Line 718:         log.info("vdsManager::disposing");
Line 719:         SchedulerUtilQuartzImpl.getInstance().deleteJob(onTimerJobId);
Line 720:         XmlRpcUtils.shutDownConnection(_vdsProxy.getHttpClient());
Line 721:         if (JsonRpcVdsServer.class.isInstance(_vdsProxy)) {
> ok the cast is gone but why did you change the if condition?
Closeable looks like good idea when you have known life cycle. In case of the 
proxy we do not know when it will be closed or even whether it will be closed 
at all.

The condition has changed because getHttpClient needs to be closed for both 
implementations so we do not need to check for VdsServerWrapper any more.

When we close JsonRpcVdsServer we perform similar operation to 
shutDownConnection on socket channel that this implementation uses.
Line 722:             ((JsonRpcVdsServer) _vdsProxy).close();
Line 723:         }
Line 724:     }
Line 725: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I204a60f20a19e79a431c9cb463073d160a5862a4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Roy Golan <rgo...@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

Reply via email to