2 Replies Latest reply on Mar 25, 2008 9:16 AM by Monique Monteiro

    Session management with JSF / RichFaces

    Monique Monteiro Newbie

      Hi all,

      I have a JSF application with the requirement that the session should never expire, unless the user closes the window. So I have the following options:

      - set session-timeout to 0 or -1 in web.xml. The problem with this option is that it may lead to excessive memory consumption in the server, and I don't know how to handle browser closing events in order to invalidate sessions.
      - set a value for timeout and "ressurrect" the session at the event of timeout. But here I should know if the user's browser is open or not. Again, I don't know how to do it in JSF (and also I don't know if it's possible).

      I use Sun RI and RichFaces. I know that there's an AJAX.onExpired event in RichFaces, but I don't know how to use it for my purposes.

      Does anyone have any idea about how I can achieve it?

      Thanks in advance,

      Monique