org.apache.commons.httpclient.ConnectionPoolTimeoutException:Timeout waiting for connection例外ソリューション

3753 ワード

問題の説明:比較的大きい同時の情況の下でAxis 2 v 1を通ります.6生成されたクライアントは関連サービスを削除し、異常を放出し続けます.
org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection
   at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnecti
   at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHtt
   at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
   at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
   at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
   at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
   at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSen
   at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
   at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
   at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
   at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
   at com.*.*.mail.action.LoginAction.execute(LoginAction.java:81)
   at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
   at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
   at com.asiainfo.aiwm.mail.action.CommonInterceptor.intercept(CommonInterceptor.java:42)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
   at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
   at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
   at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
   at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
   at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
   at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilt
   at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
   at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
   at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
   at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
   at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
   at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:527)
   at com.caucho.util.ThreadPool.run(ThreadPool.java:449)
   at java.lang.Thread.run(Thread.java:595)

ソリューション:
インターネット上で提供されるソリューションは、公式サイトで提供されるソリューションを含め、基本的には、リクエストが完了するたびに以下の方法を呼び出すものです.
_getServiceClient ().cleanupTransport ();

しかし、テストの結果、例外は依然として検出され、クライアントのバージョンを一時的に1.5に下げて問題を解決しました.