You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Sascha Dirbach (JIRA)" <ji...@apache.org> on 2018/03/08 22:37:00 UTC

[jira] [Commented] (CAMEL-11370) Problem with MTOM in Camel-CXF

    [ https://issues.apache.org/jira/browse/CAMEL-11370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16392033#comment-16392033 ] 

Sascha Dirbach commented on CAMEL-11370:
----------------------------------------

[~Peter Keller] I had a look into your reproducer. The problem with the high memory consumption is not related to MTOM, but to the involved marshalling. MTOM is just relevant when it comes to sending the data over the wire. When you marshal the object to XML, internally a DOM tree will be created with the actual data from the DataHandler and not only with a reference. 

I analyzed some heap dumps while processing and found quite large DefaultExchange (70m) and (cxf) Message (>100m) objects.

I changed your sample project to:
 * Use POJO (default) instead of PAYLOAD dataFormat
 * Set the mtom-enabled message property (required for POJO dataFormat)
 * Remove the unmarshalling and marshalling

By these changes the memory consumption stays below 100m at any time (not including the startup of the application).

You can find the required changes here: https://github.com/peterkeller/camel-cxf-memory/pull/1/files

> Problem with MTOM in Camel-CXF
> ------------------------------
>
>                 Key: CAMEL-11370
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11370
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>            Reporter: Joerg Kessler
>            Priority: Minor
>         Attachments: MTOM-conversion.patch, accept-also-sub-classes-of-orgapachecxfjaxbJAXBDataB.patch, mtom.test.zip
>
>
> I originally opened the issue on CXF:
> https://issues.apache.org/jira/browse/CXF-7388
> but ther CXF guys think the problem is in camel-cxf. Please have a look at this ticket. Basically the MTOM conversion seems not to work anymore when using CXF in Camel. I provided a unit test that demonstrates the observed behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)