简体   繁体   中英

Interlinked View Scoped beans not destroyed up on session invalidate in Jboss Server

I am developing primefaces portlets on liferay jboss server.

In my application I am using several View Scoped Beans which are linked to each other. When we tried doing a load test the Heap Memory was increasing and the server was getting stalled. When I went through the Heap Dump I could see all the view scoped beans not being destroyed. I also tried linking a Session Scoped bean into the view scoped beans so that they would be destroyed. But to my surprise, I could see the session scoped bean is also not getting destroyed and also it is being initialized for every view I injected into. The beans are destroyed fine on Tomcat, but I see this issue on Jboss alone.

I am using Mojarra 2.1.21 + primefaces 4.0.

Could anyone please help where I am going wrong. I have been googling a lot but could not find a solution from past 3 days.

I have resolved the issue by changing the implementation of WebInjectionContainer in jboss-as-web-7.1.1-final.jar. I have changed the STRONG reference type to WEAK reference for the concurrentHashMap and now the beans are destroyed upon session expiration or logout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM