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

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

with v1.1.13:

a) JsonbConfig().setProperty("johnzon.skip-cdi","true") creates a new 
SimpleJohnzonAdapterFactory() instead of CdiJohnzonAdapterFactory.

But this has no effect : JohnzonCdiExtension keeps tracking  - and we still 
must invoke close() on JsonB in order to kick out inner table JsonbBuilder 
instances;

b) With *JsonbConfig().setProperty("johnzon.cdi.activated",Boolean.FALSE)* its 
OKAY (Boolean and not String).

JohnzonCdiExtension isn't notifed... JsonB instances are closed automatically,

 

This is the perfect fix we needed - and we'ill see for our next release a 
better solution for  performance issues

> 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)

Reply via email to