Multi-Thread

Apache Commons HTTPClient を マルチスレッドで使う際の注意

Answer : MultiThreadedHttpConnectionManager を使うこと。または HTTPClient をスレッド毎にインスタンスを作成する。

HTTPClient をマルチスレッド環境で使う際の注意点が以下にある。

HttpClient - Threading

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

ポイントは MultiThreadedHttpConnectionManager を使うことにある。

http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.html

その他、パフォーマンス一般については以下に記述がある。

HttpClient - HttpClient Performance Optimization Guide

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

APIドキュメントはこちら。

Overview (HttpClient 3.1 API)

http://hc.apache.org/httpclient-3.x/apidocs/

疑問

#最初からMultiThreadedHttpConnectionManagerをデフォルトにしておけば良さそうなものを、なぜそのようにしていないのだろうか??

tags

---

apache commons httpclient multi-threading

apache commons httpclient マルチスレッド