At 04:30 PM 11/29/01 +1100, bj wrote:
>What is the best strategy for performing some action when the session
>I'm in the middle of my first webware app =) and I need to do some
>processing on middlekit objects if the session times out. At the moment,
>I store an object in the session that has my session cleanup code in
>the __del__ method.
I don't think your current method works properly if you restart the
appserver. I think the __del__ would get called when the appserver shuts
down even though your session hasn't expired.
There's an expiring() method of the Session object which is supposed to get
called when the session times out. So you could somehow replace Session
with a subclass that defines that method to do what you want. I'm not sure
if expiring() gets called in every place it's supposed to be called though.
- Geoff Talvola