• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF components in HttpSession  RSS feed

 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF stores some components in HttpSession. How does this work in clustered environment?
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How it will be different from any other distributed J2EE application. I suppose you would be doing it same way as you do in any other application like either by maintaining server stickiness or by serializing the persisted session data or by persisting in database or say by using any other external tool / app server for the purpose.
 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's true that you can serialize your own session objects and store them, say as Blobs in database. But you are not managing the JSF session objects. They are done by JSF framework.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sanz Vai:
It's true that you can serialize your own session objects and store them, say as Blobs in database. But you are not managing the JSF session objects. They are done by JSF framework.


All the JSF object, which implements saveState & restoreState methods will be taken care by JSF. You just need to specifiy
javax.faces.STATE_SAVING_METHOD=client in web.xml
Thereafter you state would be stored in a hidden variable at the client side.
As far as other objects like backing bean in session etc. are concerned, you will need to take care of it.
[ April 14, 2005: Message edited by: Varun Khanna ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!