-
1. Re: Statelessness hard to attain in Seam (or?)
Tobias Hill Jan 23, 2009 1:58 PM (in response to Tobias Hill)Ok, just found out how Christian is using variable session lengths in the wiki example application. That is of course one way to limit the impact of the unneeded session pile-up. Will apply that one while looking for other ways to circumvent JSFs (presumably) misuse of the session altogether.
Tobias
Details from the example:
@Observer("org.jboss.seam.security.loginSuccessful") public void extendSessionTime() { // Store the regular session timeout value, so we can set it back later on logout int regularSessionTimeout = ServletContexts.getInstance().getRequest().getSession().getMaxInactiveInterval(); Contexts.getSessionContext().set(REGULAR_SESSION_MAX_INACTIVE_SECONDS, regularSessionTimeout); WikiInit init = (WikiInit)Component.getInstance(WikiInit.class); if (init.getAuthenticatedSessionTimeoutMinutes() != 0) { log.debug("setting timeout of authenticated user session to minutes: " + init.getAuthenticatedSessionTimeoutMinutes()); ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval( init.getAuthenticatedSessionTimeoutMinutes()*60 ); } } @Observer("org.jboss.seam.security.loggedOut") public void resetSessionTime() { // Don't rely on that, do a null check - this should never be null but sometimes it is... *sigh* Object o = Contexts.getSessionContext().get(REGULAR_SESSION_MAX_INACTIVE_SECONDS); if (o != null) { int regularSessionTimeout = (Integer) o; log.debug("resetting timeout of user session after logout to minutes: " + regularSessionTimeout/60); ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(regularSessionTimeout); } else { // Safety, reset to a low value, 10 minutes ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(600); } }
-
2. Re: Statelessness hard to attain in Seam (or?)
Francisco Jose Peredo Noguez Jan 23, 2009 3:58 PM (in response to Tobias Hill)I have no experience with this problem, but looking at the string org.ajax4jsf.application.AjaxStateHolder it seems to me that this is a problem may be more related to Ajax4JSF/Richfaces than to Seam...
Have you tried asking this question in the RichFaces forum? Maybe they know a way to tweak (disable?) this AjaxStateHolder?
-
3. Re: Statelessness hard to attain in Seam (or?)
Francisco Jose Peredo Noguez Jan 23, 2009 4:05 PM (in response to Tobias Hill)Is this the same problem you are writing about? RF-3878. If it is... it seems to be that the problem is at the core... in JSF.
-
4. Re: Statelessness hard to attain in Seam (or?)
Tobias Hill Jan 23, 2009 4:09 PM (in response to Tobias Hill)Yes I saw that issue ... and yes I do believe that it is the very same thing.
-
5. Re: Statelessness hard to attain in Seam (or?)
gdfgd eqwe Oct 18, 2010 8:34 AM (in response to Tobias Hill)Hy!
I have a same problem! Can you tell me any suggestions for this issue?
thx.