You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2011/06/16 13:27:47 UTC
[jira] [Commented] (CXF-3572) Add a check of the message content
list to avoid the OoM error from the HolderOutInterceptor
[ https://issues.apache.org/jira/browse/CXF-3572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050354#comment-13050354 ]
Willem Jiang commented on CXF-3572:
-----------------------------------
We need to throw the exception out to help client catch the right error, and just check if the inObjects are the same object of outObjects to support better with camel-cxf.
> Add a check of the message content list to avoid the OoM error from the HolderOutInterceptor
> --------------------------------------------------------------------------------------------
>
> Key: CXF-3572
> URL: https://issues.apache.org/jira/browse/CXF-3572
> Project: CXF
> Issue Type: Improvement
> Components: JAX-WS Runtime
> Reporter: Willem Jiang
> Assignee: Willem Jiang
> Priority: Minor
> Fix For: 2.4.1, 2.3.5
>
>
> The blow code in the HolderOutInterceptor will throw the OOM error when the inObjects is same with the outObjects.
> Although this issue only happens when the Camel route set a wrong response message body, but it could be helpful if CXF can write some error log for it and prevent the OOM error.
> {code}
> if (!Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
> List<MessagePartInfo> parts = op.getOutput().getMessageParts();
> MessageContentsList inObjects = MessageContentsList.getContentsList(exchange.getInMessage());
> if (inObjects != null) {
> for (int x = 0; x < inObjects.size(); x++) {
> Object o = inObjects.get(x);
> if (o instanceof Holder) {
> outObjects.set(x + 1, o);
> }
> }
> }
> ......
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira