Aaron Shettleroe wrote:
It appears that HttpClient is sending the same request more than once.

Unlikely, unless the RetryHandler is configured to do so.


I tried to code against this.

Here is some code snippets:

private static HttpClient httpClient;
...

final HttpConnectionManagerParams params =
            new HttpConnectionManagerParams();
// set some params: timeouts, max conns
...

final MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
connectionManager.setParams(params);
httpClient = new HttpClient(connectionManager);

...

// I define a RetryHandler
getMethod.getParams().setParameter(
   HttpMethodParams.RETRY_HANDLER,
   updateRetryHandler);

...

// My retry logic.  Only retry if a connection exception:
// Don't retry if the maximum retry count has been reached
if(executionCount >= MAX_RETRY_COUNT)
{
   return false;
}
else if(!method.isRequestSent()
          && (exception instanceof ConnectException
              || exception instanceof ConnectTimeoutException))
{
   return true;
}

return false;

However, the request is being sent more than once.


Please post a context/wire log of the session.

http://hc.apache.org/httpclient-3.x/logging.html


Would the stale checking be the cause of this?  Does the stale checking
actually send the request?


No, it does not

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to