Jun 24, 2011

JSF RichFaces Session Memory Lack



If you using JSF + RichFaces, it may casue Session Memory Lack. AjaxStateHolder saves all views in the session. But the same view can occur several times in this "cache"; the views from this "cache" are not reused and just fill the session. If an application has many large views and deals with many concurrent sessions, the heap can easily grow up to Gigabytes.

Solution - Add below config in web.xml:
<context-param>
    <param-name>com.sun.faces.numberOfViewsInSession</param-name>
    <param-value>1</param-value>
</context-param>

<context-param>
    <param-name>com.sun.faces.numberOfLogicalViews</param-name>
    <param-value>1</param-value>
</context-param>

Set this config to limit JSF view cannot over assigned value.


2 comments:

Anonymous said...

I've added the configuration your proposed. However, the problem still persists.

for IT the said...

Interesting Article

JSF online training JSF online training Java Online Training Java Online Training

JSF training in Chennai JSF training in Chennai Java Training in CHennai

Post a Comment

Twitter Delicious Facebook Digg Google Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Hostgator Coupon Code