From f4df288872bc5e140301b7c764faa53037f73dff Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Mon, 24 Oct 2011 20:52:23 +0000 Subject: [PATCH] fix for: https://issues.apache.org/jira/browse/AMQ-3562 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1188371 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/transport/http/HttpClientTransport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);