[Seaside] code on expire?

Julian Fitzell julian at beta4.com
Tue Jan 6 20:25:03 CET 2004


I don't believe there is currently a hook before a session is expired 
(though there may well want to be).

What happens is that, before your session gets expired, it will have 
#isActive called on it.  If it returns false, then that session will be 
considered expired and WARegistry>>unregisterRequestHandler: will be 
called.  So in the meantime, you *could* use a custom application 
subclass to overide that method and do something, or you you could add 
an empty method to WARequestHandler (say #cleanup or something) and then 
change WARegistry>>unregisterRequestHandler: to call that method.

The other option would be to define #isActive on your session so it does 
its cleanup before returning false, but that seems a little suspect :)

I'd look at posting a version with this change for you but Avi is in the 
midst of reworking the way the handler registry stuff works anyway, so I 
think I'll wait until that's done before putting any time into a 
long-term solution.  Hopefully that will get you going in the meantime.

Cheers,

Julian

radoslav hodnicak wrote:

> i want to do clean-up when a session expires but can't find a centralized
> place where this expiring happens.
> 
> i naively thought it's sufficient to override #expire and #pageExpired in
> WASession. it's not.
> 
> what else do i need to change?
> 
> regards, radoslav

-- 
julian at beta4.com
Beta4 Productions (http://www.beta4.com)



More information about the Seaside mailing list