1
2
3
4
5
6
7 package org.mule.transport.http;
8
9 import java.io.IOException;
10 import java.net.SocketException;
11
12 import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
13 import org.apache.commons.httpclient.HttpMethod;
14
15 public class MuleHttpMethodRetryHandler extends DefaultHttpMethodRetryHandler
16 {
17 @Override
18 public boolean retryMethod(final HttpMethod method, final IOException exception, int executionCount)
19 {
20 if ((executionCount < this.getRetryCount()) && (exception instanceof SocketException))
21 {
22 return true;
23 }
24
25 return super.retryMethod(method, exception, executionCount);
26 }
27 }