Jerry Cwiklik created UIMA-5933:
-----------------------------------

             Summary: UIMA-DUCC: improve pull service http client error 
handling 
                 Key: UIMA-5933
                 URL: https://issues.apache.org/jira/browse/UIMA-5933
             Project: UIMA
          Issue Type: Bug
          Components: DUCC
    Affects Versions: 2.2.2-Ducc
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik
             Fix For: 2.2.3-Ducc


The pull service error handling in HttpServiceTransport.dispatch() is not 
optimal. While it is catching and handling some exceptions like

NoHttpResponseException
HttpHostConnectException
UnknownHostException

its not handling other ones that HttpClient.execute() may throw. 

Simplify handling of exceptions from HttpClient.execute() by simply catching 
any IOException and automatically retry until success. The HttpClient.execute() 
API is documented as:

HttpResponse org.apache.http.client.HttpClient.execute(HttpUriRequest request) 
throws IOException, ClientProtocolException
 
Note: the ClientProtocolException is a kind of (extends from) IOException

Also, the http client may succeed but returns status code != 200. In such case, 
we should also retry.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to