users@javaserverfaces.java.net

Re: Correct implementation of Phase Listener for session data.

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 02 Nov 2006 12:02:04 -0800

Todd Patrick wrote:
> Expanding on a thread labeled "Does an object that contains user session
> data need to be a managed bean?"
>
> I am creating a class extending the Phase Listener.
>
> I want to check if my session object is valid for each page, thus I
> thought that a Phase Listener would be the proper approach, since it
> would be ran for each page.
>
> The phases RESTORE_VIEW and RENDER_RESPONSE are ran in the page Life
> Cycle no matter, if I understand the docs correctly.
>
> Thus, is it proper to check my session object in the RESTORE_VIEW phase
> or is there a better way?
>
This seems fine, however, what do you plan to do if the session is no
longer valid?
> Such as a Servlet with a /* URL Pattern, that would run for each page as
> well.
>
> Thoughts on best practice is appreciated.
>
> Thanks,
>
> --Todd
>
> -----------------------------------------
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact
> the sender by reply email and destroy all copies of the original
> message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
>