2 Replies Latest reply on Aug 27, 2008 6:56 PM by Joshua Jackson

    Holding onto a message past Session invalidation

    K G Newbie


      I have been trying unsuccessfully to figure out a clean way to do the following with the Seam Framework:

      - Display a your session has timed out message on the login page when a user is redirected there for the reason that their session has timed out.

      There are several similar forum requests and blog posts attempting to address this functionality within Seam, but none work well, if at all.

      As I understand Seam Scopes, the Scope of any Bean that can or should hold such a message is ScopeType.SESSION.  The problem is that in the course of invalidating the session with  Identity.instance().logout();, all the Session-scoped Beans will be cleared out (and reloaded), including the one that is holding the timeout message meant for the login page.

      So let me pose the question:

      - How do I persist a FacesMessage throughout Session invalidation so that it is still available when the login page is rendered?

      I am open to any solution that utilizes the Seam Framework, rather than cookies or security-risk JavaScript.  Exceptions, Events, or anything else that works would be much appreciated.

      I can post my attempts to create a solution upon request, but I doubt that this will be of help.  Please let me know if you would like more info or details.

      Thank you in advance,