[ https://issues.apache.org/jira/browse/CAMEL-12451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-12451. ---------------------------------- Resolution: Fixed Committed patch into master, camel-2.21.x and camel-2.20.x branches. > Memory leak: camel-cxf componet don't release UoW in case of using "robust" > property > ------------------------------------------------------------------------------------- > > Key: CAMEL-12451 > URL: https://issues.apache.org/jira/browse/CAMEL-12451 > Project: Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.20.2, 2.20.3 > Reporter: Filippov Mihail > Assignee: Willem Jiang > Priority: Minor > Fix For: 2.20.4, 2.21.1, 2.22.0 > > > In case of using "org.apache.cxf.oneway.robust" property camel-cxf component > doesn't release UoW that leads to huge memory leak. I think it's relied with > the feature of output chain of cxf framwork which doesn't invoke additional > interceptors in case of oneway operation. > in other words, this code is not called: > https://github.com/apache/camel/blob/master/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java > > {code:java} > private class UnitOfWorkCloserInterceptor extends > AbstractPhaseInterceptor<Message> { > public UnitOfWorkCloserInterceptor() { > super(Phase.POST_LOGICAL_ENDING); > } > @Override > public void handleMessage(Message message) throws Fault { > Exchange cxfExchange = null; > if ((cxfExchange = message.getExchange()) != null) { > org.apache.camel.Exchange exchange = > cxfExchange.get(org.apache.camel.Exchange.class); > if (exchange != null) { > doneUoW(exchange); > } > } > } > } > {code} > minimal example: > > > {code:java} > <cxf:cxfEndpoint id="soap_in1" > address="/service1" > xmlns:tns="urn:api:service1" > wsdlURL="wsdl/service1.wsdl" > serviceName="tns:service1" > endpointName="tns:HTTP_Port"> > <cxf:properties> > <entry key="dataFormat" value="PAYLOAD"/> > <entry key="org.apache.cxf.oneway.robust" value="true"/> > </cxf:properties> > </cxf:cxfEndpoint> > <camelContext xmlns="http://camel.apache.org/schema/blueprint" > id="context1"> > <route id="loadTest1"> > <from uri="cxf:bean:soap_in1"/> > <to uri="log:end"/> > </route> > </camelContext> > {code} > > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)