5 Replies Latest reply on Sep 27, 2011 10:06 AM by Anton Lisovenko

    RenderScoped VS ViewScoped

    Anton Lisovenko Newbie

      Hi.


      I use CDI ViewScope intensively (the one, offered by Steven Verborgh: http://www.verborgh.be/articles/2010/01/06/porting-the-viewscoped-jsf-annotation-to-cdi/) but in production I face memory problems: sessions grow rapidly and take much memory. In business purpose I have pretty long session timeout (about 7 hours). I tried to diminish the number ov JSF views and logical views in session (


      com.sun.faces.numberOfViewsInSession=5



      and


      com.sun.faces.numberOfLogicalViews=10



      ) but this has not resulted in some prominent success.


      In this case I'm thinking about RenderScope, suggested by Seam faces. Seems these beans are destroyed sooner, than view scoped - as far as written in documentation. Can anyone say something about shortcomings and advantages of renderScope in comparison to viewScope? Are there any hidden obstacles of using this scope?


      Thanks.