From: Michael Engelhart <mengelhart@ka...> - 2002-12-05 14:51:45
Hi all -
I'm new to devel but have been using Webware for a month or so.
One thing I missed from our Java brethren was session expiration hooks
where when a session is expiring or being invalidated an event was
fired to a method that your app could implement. I found the
addShutdownHandler() method in Application.py and took that simple
mechanism as model to add a addSessionExpirationHandler() method to
Session.py. All in all it's almost identical in functionality to the
Application.addShutdownHandler() method concept.
I've done some trivial testing and it works very well. I have tested
it for closing database connections, ldap connections, etc. I realize
that some of these are kind of silly because most of those connections
shut themselves down anyway when they are gc'd but that was what I used
for testing as I could watch the results. Possible uses would be say
someone fills a shopping cart and then fills out their name and address
info and click continue to enter their CC information but their browser
crashes and they don't feel like typing everything in, this hook could
take that Session data and generate an HTML email to send to that user
asking if they want to finish the transaction.
Anyway, I'm wondering if I can post the diff from Session.py here or
how I could get this added to Webware?