Session scoped JSF beans accumulate in WebInjectionContainer when a distributable session cache is used
Issue
- When our application has the
<distributable/>tag in its WEB-INF/web.xml, we see heap growth from JSF session scoped beans accumulating in the WebInjectionContainer:
Class Name | Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
service org.wildfly.extension.undertow.deployment.UndertowDeploymentService @ 0x50f329230 | 125,147 | 40 | 9,010,584 | 40
'- webInjectionContainer org.jboss.as.web.common.WebInjectionContainer @ 0x50f329298 | 125,147 | 24 | 9,010,584 | 3,401,632,128
'- instanceMap org.jboss.as.web.common.ConcurrentReferenceHashMap @ 0x50f3292b0 | 125,147 | 48 | 9,010,584 | 3,401,632,104
'- segments org.jboss.as.web.common.ConcurrentReferenceHashMap$Segment[2] @ 0x50f3292e0 | 125,147 | 24 | 9,010,584 | 3,401,632,056
|- [0] org.jboss.as.web.common.ConcurrentReferenceHashMap$Segment @ 0x50f34b958 | 62,788 | 56 | 4,520,736 | 1,502,618,200
| '- table org.jboss.as.web.common.ConcurrentReferenceHashMap$HashEntry[131072] @ 0x591400000| 62,788 | 524,304 | 4,520,736 | 1,502,618,032
| |- [58249] org.jboss.as.web.common.ConcurrentReferenceHashMap$HashEntry @ 0x641530970 | 5 | 32 | 360 | 8,144
| | | |- keyRef com.redhat.BeanInstance @ 0x641530990 | 1 | 72 | 72 | 1,328
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Session attribute listeners are invoked upon session destruction with a non-distributable session manager, but they are no longer invoked in this case when our app is set for
<distributable/>
Environment
- JBoss Enterprise Application Platform (EAP) 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.