+++ This bug was initially created as a clone of Bug #1155490 +++ Description of problem: Platform BZ for https://issues.jboss.org/browse/JBWS-3847 HandlerChainSortInterceptor.handleMessage(Message) sorts and sets JAX-WS handlers every time it handles a SOAP message: 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); } } } 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. How reproducible: 100% Steps to Reproduce: 1. Implement a JAX-WS client with one JAX-WS handler 2. Run the client invoking the service port method indefinitely Actual results: You'll see memory leak (= increase of memory usage). Expected results: Memory leak should not happen.
Alessio Soldano <asoldano> updated the status of jira JBWS-3847 to Resolved
Verified on EAP 6.3.3 CR1. Custom app created, execute 1 million iterations. Screenshot of jconsole attached
Created attachment 981781 [details] 6.3.2-vs-6.3.3
Alessio Soldano <asoldano> updated the status of jira JBWS-3847 to Closed