简体   繁体   English

Jboss Server中未在会话上销毁的互连View Scoped bean无效

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

I am developing primefaces portlets on liferay jboss server. 我正在liferay jboss服务器上开发primefaces portlet。

In my application I am using several View Scoped Beans which are linked to each other. 在我的应用程序中,我使用了几个相互链接的View Scoped Bean。 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. 当我通过堆转储时,我可以看到所有视图范围的bean都没有被破坏。 I also tried linking a Session Scoped bean into the view scoped beans so that they would be destroyed. 我还尝试将Session Scoped Bean链接到View Scoped Bean中,以便将其销毁。 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. 但是令我惊讶的是,我可以看到会话作用域的bean也没有被销毁,并且为我注入的每个视图都对其进行了初始化。 The beans are destroyed fine on Tomcat, but I see this issue on Jboss alone. Bean在Tomcat上销毁良好,但我仅在Jboss上看到此问题。

I am using Mojarra 2.1.21 + primefaces 4.0. 我正在使用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. 我已经通过更改jboss-as-web-7.1.1-final.jar中的WebInjectionContainer的实现解决了该问题。 I have changed the STRONG reference type to WEAK reference for the concurrentHashMap and now the beans are destroyed upon session expiration or logout. 我已将并发HashMap的STRONG引用类型更改为WEAK引用,现在在会话到期或注销时销毁了bean。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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