Hi, Please note that the HTTP sender already supports reusing the connection manager. This can be enabled by setting the REUSE_HTTP_CLIENT option. See the code in the first part of the AbstractHTTPSender#getHttpClient method.
Regards, Andreas On Wed, Dec 24, 2008 at 15:04, MaWenPeng <[email protected]> wrote: > Hello, > In my programs(Servlet,JSP or Java Application), I find that the Axis2 > Client HTTP Connection Pool does not work well. > I create WebService Axis2 client Stubs with ADB bindings. Each time when > the stub accesses the WebService, the HTTP Connections created by the stub > could NOT be reused or closed. Then there are a lot of freezed HTTP > Connections. I can see the connections' status in my FireWall. > For a long time, I find out that the MultiThreadedHttpConnectionManager > object should be a static one. > So I make some changes in > org.apache.axis2.transport.http.AbstractHTTPSender.java: > Define a static MultiThreadedHttpConnectionManager in it; > In getHttpClient(MessageContext msgContext) methd, use this static > MultiThreadedHttpConnectionManager; > Also, I make some changes in MultiThreadedHttpConnectionManager.java: > Increase DEFAULT_MAX_HOST_CONNECTIONS and > DEFAULT_MAX_TOTAL_CONNECTIONS numbers. > Things change a lot. The MultiThreadedHttpConnectionManager manages the > HTTP Connection pool excellently. > The attachments are the files I have changed. > In AbstractHTTPSender.java: Line 70 and 447 > In MultiThreadedHttpConnectionManager.java: Line 73 and 76 > I hope this will make some help to Axis2 project. > > > ________________________________ > [广告] 重奖 悬赏kfc3v3 球衣
