2013-06-18 47 views
0


我正在使用AXIS2 1.4.1通过SSL调用Web服务系统,J2EE应用程序

我有相同的问题:https://issues.apache.org/jira/browse/AXIS2-2883
** CLOSE_WAIT建设缓慢在一段时间内。 **

这迫使我们每隔几天就重新启动生产环境中的应用程序,因为打开的文件在对应于CLOSE_WAIT套接字的jvm上生成。
我在网上看到很多帖子来升级AXIS来解决这个问题,但是在这个阶段,升级AXIS几乎是不可能的,因为应用程序正在生产中,并且还有其他的依赖关系,所以我们需要端到端地测试应用程序 - 这是不可能的..

从AXIS 1.5.6:
http://docs.huihoo.com/apache/axis/axis2-1.5.1/release-notes.html使用Axis2 CLOSE_WAIT插座1.4.1

Fix for the dreaded "CLOSE_WAIT" problem (JIRA issues 935, 2883, etc). 
We now share an instance of HTTPClient across each ConfigurationContext (i.e. each Axis2 server or ServiceClient) - connection reuse is now automatic. 
This means the REUSE_HTTP_CLIENT flag is no longer necessary or useful, nor is creating your own MultithreadedHttpConnectionManager. 



任何方式,我们可以最大限度地减少对AXIS2 1.4.1 CLOSE_WAIT套接字的数量? 。
感谢

+0

如果问题出在Axis上,解决方案也将在Axis中进行。你需要改变一些东西,你也必须去测试它。 – EJP

回答

0


这救了我的命:
http://axis.8716.n7.nabble.com/Stubs-amp-Options-Configuration-td44576.html

选项O = stub._getServiceClient()getOptions();
o.setProperty(HTTPConstants.CHUNKED,Boolean.FALSE);
o.setProperty(HTTPConstants.MC_ACCEPT_GZIP,Boolean.TRUE);
o.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,Boolean.TRUE);
o.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,getHttpClient());