Optimizing CXF Webservice

旧巷老猫 提交于 2019-12-13 10:36:36

问题


I have a CXF web service which processes requests containing base64 strings. Some of the requests take long time which exceeds our requirements. I want the processing to complete by 3 seconds but most requests are taking 12 seconds. When i trace the processing of the interceptors, the DocLiteralInInterceptor is consuming the most time. As per documentation, this interceptor checks the SOAPAction and binds the message. I am using aegis binding and tried to disable the validation with schema-validation-enabled to false in the configuration. But there is no improvement. Is there any way to optimize the binding process?

Thanks in advance.


回答1:


Managed to get the timing reduced from 12 sec to 200 ms by in-memory processing instead of file based processing. This was done by overriding the default CXF property of 64 KB for in-memory processing to 1MB as below:

 <cxf:properties>
        <entry key="bus.io.CachedOutputStream.Threshold" value="1000000"/>
        <entry key="bus.io.CachedOutputStream.MaxSize" value="1000000000"/>
</cxf:properties>


来源:https://stackoverflow.com/questions/52287431/optimizing-cxf-webservice

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!