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

Richard Zowalla commented on TOMEE-4214:
----------------------------------------

I know, that something similar was reported on the lists: 
https://lists.apache.org/thread/925sg1z4f55kb6wlrvplzcxd1o945zgc

> possible memory leak using rest-client-builder
> ----------------------------------------------
>
>                 Key: TOMEE-4214
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4214
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 9.0.0
>            Reporter: Stephan Freund
>            Priority: Major
>
> An instance of Jsonb is created and registered in JohnzonCdiExtension#track 
> per outgoing request.
> Test case below (with extra dummy echo rest server listening on 
> [http://localhost:8080/echo)|http://localhost:8080/echo].
> App exits after a while with OutOfMemoryError.
> [https://github.com/apache/tomee/compare/main...farnetto:tomee:jaxrs-client-memory-leak]
> Problem seems to stem from use of WebTarget#path (target URI is dynamic) 
> where ClientProviderFactory / JsonbJaxrsProvider is incorrectly *not* reused 
> as per javadoc:
> [https://jakarta.ee/specifications/platform/9.1/apidocs/jakarta/ws/rs/client/webtarget#path-java.lang.String-]
> "A snapshot of the present configuration of the current (parent) target 
> instance is taken and is inherited by the newly constructed (child) target 
> instance."



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to