Linked ViewScoped beans lead to memory leaks

前端 未结 1 443

In our JavaEE6 project (EJB3, JSF2) on JBoss 7.1.1, it seems we have a memory leak with @ViewScoped beans. Last tree days I\'ve spent time on this issue investigation. So i\

1条回答
  •  一整个雨季
    2020-12-31 15:35

    Unfortunately, you're correct, There are known issues with @ViewScoped memory management(and isn't concerned with just chaining the views) as you'll see here and here. Also look at this question What you could experiment with is to get your hands on the UIViewRoot object per the current session and call getViewMap().remove("myView") based on some event. You could also try this

    Unrelated to this, why're you chaining view scoped beans? They're intended to be used as named, for views. Are you constrained from using the SessionScoped?

    0 讨论(0)
提交回复
热议问题