This content has been marked as final. Show 20 replies
Let me see I if I got this right:
you say that if set an inactivity timeout threshold to 10 minutes, then if during these 10 minutes you just click on the pagination buttons in a PPR region without doing any other APEX activity, then the timeout occurs?
Supposing that for some reason you cannot remove the inactivity timeout, then I'd go for a dynamic action attached to the pagination buttons (they come with their own CSS class if I remember well), and in this dynamic action you execute something that resets the timeout, most likely you need to do something that changes the state of an apex session variable.
Let's say, within the instance Security Settings for the workspace, you set Maximum Session Length in Seconds and Maximum Session Idle Time in Seconds both to 0. The documentation says that, for the prior "Enter 0 to have the session exist indefinitely" and for the latter "Set to 0 to prevent session idle time checks from being performed"
These do appear to work so long as the page does not have a PPR region on it (that is being routinely and automatically refreshed).
However, when you do have such a region, the PPR region itself will "hang" with exactly the behavior decribed here (http://www.talkapex.com/2009/09/enhanced-apex-session-timeouts.html).
Specifcally, this post amounts to:
1. What is the setting to reset?
2. What does it need to be reset to?
3. How do I reset it?
Ok, now, reading your past thread I understand that the problem you describe is:
1. you start the IR report
2. the report starts refreshing automatically
3. after some hours the session expires and the IR shows the "refreshing" icon indefinitely
The documentation says that setting the max session length to null, it will last indefinitely, however that's not true because a session can't live for more than 12 hours. There is a background job running every 8 hours that wipes out sessions older than 12 hours.
Now, what I am not clear with, is the kind of solution you are pursuing. Given the fact that there is an enforced limit of 12 hours, you can't expect to extend the session lifetime beyond that limit (unless we find a way to hack the session creation time I guess or copy over all session values to a new session before it expires). Some of the prospected solutions assume that you are using an application with a short session lifetime (10 minutes as in the example of Martin), that can be extended when it's over, however this doesn't seem to be possible in the case of an application whose session has already reached the maximum hard coded limit of 12 hours.
The only viable solution I see is to check if the session has expired from within a dynamic action triggered by a before refresh framework event defined on the IR region and redirect the browser to the login page.
I like the idea of using the before refresh event.
Another thing to consider, depending on the use case and the extent to which session state is being used, one could write values to a table or cookie and then use those values to "recreate" the previous session.
This doesn't seem like the kind of application that has a real end user so perhaps even the authentication could be automated.
exactly, it's something that needs some investigation, whether it's better to stage the values in a cookie or somewhere else I don't know for sure, there are drawbacks in either cases I guess, but given the fact the values are stored in the db, I'd go for the table, there's gonna be less traffic over the network.
Or may be there is a way to transform the existing session state rows into the fresh ones with a magic touch of SQL update ;-)
Frankly speaking I'd love to see an official Apex API that takes an existing session id and extends it by a user-specified number of minutes.
Joe, have you tried a meta refresh to reload the page? I wonder if this would reset the session counter/timer.
Here 480 is 8 min (60 x 8) so that the page re-loads before the session timeout occurs. The code needs to be in the HEAD section of the page.
<meta http-equiv="refresh" content="480;URL='f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:'" />
I suppose you could do a combination of page reload with the meta command and the DA refresh, whatever it's your preference. Or just switch to the meta command.
Sorry, just saw this. For some reason I no longer get emails when my posts receive replies. (it is set up in my prefs to do this).
Are other people still getting updates via Email? That used to work for me and they aren't going to Junk mail or anything.
We don't want to refresh the page, we just want to use the PPR capability to refresh the one region.
To all others who were kind enough to pitch in,
This is not a 12 hour limit. I haven't gotten a specifc time but, it is more like an 1 hour. If they had to restart once per day (or every 12 hours) I think that would be just fine. An interactive Report that is refrreshed via PPR locks up for us after about an hour.