[jbossws-issues] [JBoss JIRA] (JBWS-3847) Memory leak in JBoss WS CXF Client's HandlerChainSortInterceptor

RH Bugzilla Integration (JIRA) issues at jboss.org
Tue Nov 11 09:34:48 EST 2014


    [ https://issues.jboss.org/browse/JBWS-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018754#comment-13018754 ] 

RH Bugzilla Integration commented on JBWS-3847:
-----------------------------------------------

Kabir Khan <kkhan at redhat.com> changed the Status of [bug 1155490|https://bugzilla.redhat.com/show_bug.cgi?id=1155490] from MODIFIED to ASSIGNED

> Memory leak in JBoss WS CXF Client's HandlerChainSortInterceptor
> ----------------------------------------------------------------
>
>                 Key: JBWS-3847
>                 URL: https://issues.jboss.org/browse/JBWS-3847
>             Project: JBoss Web Services
>          Issue Type: Bug
>          Components: jbossws-cxf
>    Affects Versions: jbossws-cxf-4.3
>            Reporter: Tadayoshi Sato
>            Assignee: Alessio Soldano
>             Fix For: jbossws-cxf-4.3.2, jbossws-cxf-5.0.0.Beta2
>
>
> {{HandlerChainSortInterceptor.handleMessage(Message)}} sorts and sets JAX-WS handlers every time it handles a SOAP message:
> {code:java}
>    public void handleMessage(Message message) throws Fault
>    {
>       if (binding != null) {
>          @SuppressWarnings("rawtypes")
>          List<Handler> list = binding.getHandlerChain();
>          if (list != null && !list.isEmpty()) {
>             Collections.sort(list, comparator);
>             binding.setHandlerChain(list);
>          }
>       }
>    }
> {code}
> However, inside the {{org.apache.cxf.jaxws.binding.AbstractBindingImpl}} and {{org.apache.cxf.jaxws.support.JaxWsEndpointImpl}} implementations the handler chain is not reset every time but piled up with interceptors, which leads to subtle but indefinite memory leak in JBoss WS CXF client.
> Furthermore, {{org.apache.cxf.jaxws.support.JaxWsEndpointImpl}} holds the interceptors as a kind of {{java.util.concurrent.CopyOnWriteArrayList}}. So modifying the growing list of interceptors per each message should cause a growing performance drawback, which is also not a good implementation.



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the jbossws-issues mailing list