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

Richard Zowalla edited comment on TOMEE-4214 at 5/9/23 9:28 AM:
----------------------------------------------------------------

Might be related 
https://issues.apache.org/jira/projects/JOHNZON/issues/JOHNZON-161


was (Author: rzo1):
See https://issues.apache.org/jira/projects/JOHNZON/issues/JOHNZON-161

> 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