diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java index 88ee07bac0..800b1d9e7e 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java @@ -41,6 +41,7 @@ import org.apache.http.conn.params.ConnRoutePNames; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; import org.apache.http.message.AbstractHttpMessage; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; @@ -224,7 +225,7 @@ public class HttpClientTransport extends HttpTransportSupport { } protected HttpClient createHttpClient() { - DefaultHttpClient client = new DefaultHttpClient(); + DefaultHttpClient client = new DefaultHttpClient(new ThreadSafeClientConnManager()); if (getProxyHost() != null) { HttpHost proxy = new HttpHost(getProxyHost(), getProxyPort()); client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);