johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Kay (Jira)" <j...@apache.org>
Subject [jira] [Commented] (JOHNZON-161) JohnzonCDIExtension might create a mem leak
Date Tue, 28 Apr 2020 07:09:00 GMT

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

Stephen Kay commented on JOHNZON-161:
-------------------------------------

[~romain.manni-bucau] well, with IT quite a lot of things are automatically done ;)

In our huge application - 20 years old - we are using same code in TomEE side and on Batch
side as well - static void main.  We can't refactor when its already deployed in Prod - on
premise environement. We have been able to patch the application with your solution - perfect
!

We are refactoring the app and just starting with CDI - and these part of code don't have
CDI activated yet when running a Batch. Thats the main reason why we can't change coding style
yet.

I need to activate CDI on batches with the ApplicationComposer of TomEE, and then I think
we'll move on better coding style.

BR 

> JohnzonCDIExtension might create a mem leak
> -------------------------------------------
>
>                 Key: JOHNZON-161
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-161
>             Project: Johnzon
>          Issue Type: Task
>          Components: JSON-B
>    Affects Versions: 1.1.7
>            Reporter: Mark Struberg
>            Priority: Major
>             Fix For: 1.2.5
>
>
> We use Json-B quite heavily and I experienced that there are tons of elements in org.apache.johnzon.jsonb.cdi.JohnzonCdiExtension#jsonbs.
> Way too much for my gut feeling.
> The reason is that we do not use JsonBuilder as autocloseable is that it is not required
by the spec.
>  
> There is also not much documentation for JohnzonCdiExtension, so I can only guess that
it is for cleanly shutting down unused JsonbBuilder instances when the app stops.
> We should probably only store WeakReferences.
>  
> I think the safest



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message