Hi list,
I've just read this in the Announcements chapter of the CollaborActive Book: If your client object is to be destroyed before the subject, do not forget to unsubscribe it from the announcer, or it will not be garbage collected and will keep receiving events! Is that an issue I should be handling in Iliad? My sessions never expire, so I'm guessing this could end up in lots of instances of widgets who subscribed to an announcement.
If so, how can I know when a widget has just stopped being "used"? Thanks! Bernat Romagosa. |
2012/5/7 Bernat Romagosa <[hidden email]> Hi list, Hi Bernat,
Why don't they expire?
You cannot know, because a tab with this widget could still be open. Until the session expires, all registered widgets/applications should be available.
Cheers, Nico
|
Hi Nico,
They only expire if the user logs out. If a user comes back after a week, when he points at the app's url, he should still be logged in. Is there a better solution than to make sessions last forever? We went this way because we'll only have around 200 users, so we thought the session data wouldn't become that huge...
Cheers!
2012/5/8 nicolas petton <[hidden email]>
Bernat Romagosa. |
Bernat Romagosa <[hidden email]> writes:
> They only expire if the user logs out. If a user comes back after a > week, when he points at the app's url, he should still be logged in. > Is there a better solution than to make sessions last forever? We went > this way because we'll only have around 200 users, so we thought the > session data wouldn't become that huge... I would clear the state of the session (actions and applications/widgets) instead of doing a real expire, and set the expire to 24 hrs. This way you keep your users logged in, and keep your sessions lightweight. Cheers, Nico |
Thanks Nico, we'll do as you advise :)
2012/5/8 <[hidden email]>
Bernat Romagosa. |
I'm trying to define the expiry seconds preference, but it doesn't seem to be working. I've tried the following:
MySession >> initialize
super initialize. self expirySeconds: 10 and also: MySession >> defaultExpirySeconds ^ 10
But I wait for 10 seconds and the #expire method isn't triggered. What am I doing wrong?
Thanks! Bernat Romagosa. |
Figured it out!
The minimum expiry time is 10 minutes, as that's the interval at which ILSessionManager checks which sessions are expired. We were being too... impatient ;) Everything working now, thanks!
2012/5/9 Bernat Romagosa <[hidden email]> I'm trying to define the expiry seconds preference, but it doesn't seem to be working. I've tried the following: Bernat Romagosa. |
Cool!
Did you manage to clear the session state instead of really expiring it? Something like the following should work: MySession >> expire
"Do not actually expire. Just clear the session state and keep users logged in." self clearActionRegistry; clearStateRegistries. applications := nil
Nico 2012/5/9 Bernat Romagosa <[hidden email]> Figured it out! |
Yep, my expire is pretty similar :)
MySession >> expire self actionRegistry unregisterAllActions. applications := IdentityDictionary new.
announcer := Announcer new. self clearActionRegistry;
clearStateRegistries. Bernat. 2012/5/9 nicolas petton <[hidden email]> Cool! Bernat Romagosa. |
Free forum by Nabble | Edit this page |