[ 
https://issues.apache.org/jira/browse/TOMEE-4214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephan Freund updated TOMEE-4214:
----------------------------------
    Description: 
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 .

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 is incorrectly not reused 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."

> possible memory leak using rest-client-builder
> ----------------------------------------------
>
>                 Key: TOMEE-4214
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4214
>             Project: TomEE
>          Issue Type: Bug
>            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 .
> 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 is incorrectly not reused 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