-
1. Re: Http Session Management into Seam
grdzeli_kaci Apr 10, 2007 12:51 AM (in response to grdzeli_kaci)anybody knows about it ?
-
2. Re: Http Session Management into Seam
stu2 Apr 10, 2007 3:19 AM (in response to grdzeli_kaci)What specifically are you looking to do?
Seam doesn't have much in the way of session-specific management, at least that I'm aware of. Session is just one of the available contexts. -
3. Re: Http Session Management into Seam
grdzeli_kaci Apr 10, 2007 6:47 AM (in response to grdzeli_kaci)hi stu2
for user identification on my system i use org.jboss.seam.security.Identity class,
i need that after 10 minutes system outomatically logged out and go to my ligin page.
i know how to destroy session by HttpSessionListener implementation but how i can redirect into login page and how to say Identity class to logout ?
Regards,
Paata -
4. Re: Http Session Management into Seam
patrickmadden Apr 10, 2007 4:27 PM (in response to grdzeli_kaci)Regarding Session, you should look into the code of SeamListener.java and Lifecycle.java
I had similar issues with knowing when a session context actually became active in my components. I found the @Create annotation that you can use inside of you SFSB components that have Session Scope. You put this above a method and that method will be called when Seam fully creates your sessioned component. For example:/** * This method is called after this component has been successfully * instantiated by the Seam framework */ @Create public void create() { log.info("WebDocumentTreeModelBean create method called"); if (Contexts.isSessionContextActive()) { // do what ever you need to do once your session is active } else { log.info("SessionContext is still not active after component creation event"); } }
You would also need to define the public void create() method in your local interface but I found this useful. I never knew exactly when Contexts.isSessionContextActive() was valid until I found this annotation.
Hope this helps.