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

Vladimir Kulev commented on CXF-7277:
-------------------------------------

Thanks, 'resetThreadLocalStateImmediately' you introduced is exactly what's 
sufficient in my use case.

> Make ClientProxyImpl reset client state after a call
> ----------------------------------------------------
>
>                 Key: CXF-7277
>                 URL: https://issues.apache.org/jira/browse/CXF-7277
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.1.10
>            Reporter: Vladimir Kulev
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 3.2.0, 3.1.11
>
>
> It would be nice to call {{getState().reset()}} in 
> {{ClientProxyImpl.invoke()}} final block. My use case is 
> {{JAXRSClientFactoryBean}} in thread-local configuration, which combined with 
> big thread pool can cause a kind of memory leak. I never need to access the 
> state after I get result from the proxy, but if you think somebody may need, 
> let's make it configurable.
> There is "timeToKeepState" of course, but it's far from ideal because 
> response objects still cannot be garbage collected immediately and there's 
> small added overhead of having all that extra threads.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to