Liron Ar has posted comments on this change.

Change subject: core: HttpConnManager - add connection/sockets timeouts
......................................................................


Patch Set 1:

(2 comments)

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

Line 44: 
Line 45:     private static final String HTTP = "http://";;
Line 46:     private static final String HTTPS = "https://";;
Line 47:     private static final int CONN_TIMEOUT = 60000;
Line 48:     private static final int SOCK_TIMEOUT = 60000;
we could export both to a config value if wanted.
Line 49:     private static Log log = LogFactory.getLog(XmlRpcUtils.class);
Line 50:     static {
Line 51:         if (Config.<Boolean> 
getValue(ConfigValues.EncryptHostCommunication)) {
Line 52:             URL keystoreUrl;


Line 142:     }
Line 143: 
Line 144:     private static HttpClient createHttpClient(int clientRetries) {
Line 145:         HttpConnectionManagerParams params = new 
HttpConnectionManagerParams();
Line 146:         params.setConnectionTimeout(CONN_TIMEOUT);
the connection timeout need to be set here as it can't be set per one request.
the socket timeout can be set for specific request, but i thought that it'll be 
nice that have that regardless. if we don't want to handle with veriyfing it i 
can move it to wherever i execute the http method.
Line 147:         params.setSoTimeout(SOCK_TIMEOUT);
Line 148:         MultiThreadedHttpConnectionManager httpConnectionManager = 
new MultiThreadedHttpConnectionManager();
Line 149:         httpConnectionManager.setParams(params);
Line 150:         // Create the client:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4e927ce28c8fdd9bcdcdb37e23b8d45c7515fd55
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to