[
https://issues.apache.org/jira/browse/CXF-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219319#comment-14219319
]
Marnix Klooster commented on CXF-1819:
--------------------------------------
@[~dkulp]: Please note that this added robustness has disappeared again, since
r764781 from April 14, 2009 by [~sergeyb] (and/or [~sergey_beryozkin]) in
https://svn.apache.org/repos/asf/cxf/tags/cxf-2.7.5/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java,
as we found out the hard way.
Personally, I think that the robustness should be there. If not, then I would
expect at least a note in the JavaDoc of {{Interceptor#handleFault()}}, saying
that this method MUST NOT throw an exception...
What happened to us, is that in some scenarios we DID throw an exception, the
{{unwind()}} did not complete, and the rather large request remained in
{{MAPCodec#uncorrelatedExchanges}} leading to an out-of-memory condition, just
like in CXF-2591...
What do you think?
Thanks!
> Make PhaseInterceptorChain.unwind() more defensive wrt handleFault()
> exceptions
> -------------------------------------------------------------------------------
>
> Key: CXF-1819
> URL: https://issues.apache.org/jira/browse/CXF-1819
> Project: CXF
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.1
> Reporter: Mike Quilleash
> Assignee: Daniel Kulp
> Fix For: 2.0.10, 2.1.4
>
>
> Currently the PhaseInterceptorChain.unwind() method looks like this (logging
> omitted)
> while (iterator.hasPrevious()) {
> Interceptor currentInterceptor = iterator.previous();
> currentInterceptor.handleFault(message);
> }
> It would be better to defend against an exception in handleFault() as
> currently an exception thrown from a handleFault() stops the unwind.
> New proposed code...
> while (iterator.hasPrevious()) {
> Interceptor currentInterceptor = iterator.previous();
> try {
> currentInterceptor.handleFault(message);
> catch (Exception e) {
> LOG.log( Level.ERROR, "Exception in handleFault on
> interceptor " + currentInterceptor, e);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)