Hi

I'm cc to MyFaces users list, because these issues should be discussed
there.

It is a known issue, in resume it is JBossWeb fault, because that map
should be a WeakHashMap but synchronized, to ensure the instances are
discarded when the beans are serialised into session (in that case destroy
will not be called). The fix should be done in WebInjectionContainer, but
set org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
<https://myfaces.apache.org/core20/myfaces-impl/webconfig.html#org_apache_myfaces_SERIALIZE_STATE_IN_SESSION>
to
false could help to mitigate a bit the leak.

There is an issue related to @PreDestroy and view scope in

https://issues.apache.org/jira/browse/MYFACES-4047

but I guess it won't help in your case, because the leak is caused by the
map itself.

regards,

Leonardo Uribe


2016-09-01 3:34 GMT-05:00 Thony Lundin <thony.lun...@tieto.com>:

> Hi Leonardo,
>
> writing you since you are MyFaces core project lead and want to ask about
> a possible issue in MyFaces 2.2.10 regarding not released viewscope beans.
>
> I have seen on Internet that there was multiple such issues reported for
> mojarra&myfaces in the past and Red Hat did some fix in their EAP 6.1.1 or
> so (in the mojarra module) to solve this issue.
>
> Problem for us is that we came from using tomcat and went on top of Red
> Hat EAP with JBossWeb and wanted to keep MyFaces (since it provided us with
> best performance and configuration options) but we are hit by this memory
> leak that somehow MyFaces and JBossWeb do not interact properly when a
> viewscope bean is getting invalidated. Problem is that when viewscope is
> invalidated the reference to our controllers are still kept in JBossWeb
> WebInjectionContainer and it is kept there forever, even if session expires?
>
> org.jboss.as.web.deployment.WebInjectionContainer @ 0xc45318d8 | 32 |
> 649,769,928 | 73.07% |- org.jboss.as.web.deployment.ConcurrentReferenceHashMap
> @ 0xc4532518 | 48 | 649,766,792 | 73.07% | '- org.jboss.as.web.deployment.
> ConcurrentReferenceHashMap$Segment[4] @ 0xc4532548| 32 | 649,766,744 |
> 73.07% | |- org.jboss.as.web.deployment.ConcurrentReferenceHashMap$Segment
> @ 0xc4532568| 56 | 187,909,296 | 21.13%
>
> Red Hat will not do anything due to that they only support mojarra so I am
> asking if this is something known on MyFaces project and if there is
> something that could be done on MyFaces core side about it (just asking
> since same problem for JBossWeb&mojarra was solved somehow on mojarra side)
> or if you think this is a JBossWeb fault?
>
> Grateful for any information you can share on this issue.
>
> Best Regards,
> Thony
>

Reply via email to