带有Axis2 Web服务的IBM WebSphere 8内存泄漏 [英] IBM WebSphere 8 memory leaks with Axis2 Web Services
问题描述
将应用程序从v6迁移到WebSphere v8,并开始遇到内存泄漏.主要嫌疑人是org.apache.axis2.看起来每次应用程序调用Web服务时,WAS8都会创建一个名为ServiceClient的对象,并将其存储在名为ClientConfigurationContextStore的对象中,然后再也不会进行垃圾回收.有人有类似的问题吗?
Migrated an application to WebSphere v8 from v6 and started getting memory leaks. The primary suspect is org.apache.axis2. It looks like each time the application calls a web service, an object called ServiceClient is created by WAS8 and stored in something that's called ClientConfigurationContextStore and then never garbage collected. Has anybody had a similar issue?
推荐答案
通过在提供的soap实现上强制使用原始轴1.4解决了该问题.这是通过在应用程序的WEB-INF/services中放置两个文件来完成的.第一个文件称为javax.xml.soap.MessageFactory,包含"org.apache.axis.soap.MessageFactoryImpl",第二个文件称为javax.xml.soap.SOAPConnectionFactory,并包含"org.apache.axis.soap.SOAPConnectionFactoryImpl".因此,现在在代码中这样:javax.xml.soap.SOAPConnectionFactory.newInstance()在返回com.ibm.ws.webservices东西之前返回org.apache.axis东西.不再有内存泄漏.
Fixed the problem by forcing original axis 1.4 over supplied soap implementation. This was done by placing two files in WEB-INF/services of the application. First file is called javax.xml.soap.MessageFactory and contains 'org.apache.axis.soap.MessageFactoryImpl' and the second is called javax.xml.soap.SOAPConnectionFactory and contains 'org.apache.axis.soap.SOAPConnectionFactoryImpl'. So now in the code this: javax.xml.soap.SOAPConnectionFactory.newInstance() returns a org.apache.axis stuff while before it was returning com.ibm.ws.webservices stuff. No memory leaks anymore.
这篇关于带有Axis2 Web服务的IBM WebSphere 8内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!