On Tue, 1 Mar 2005 17:21:18 -0800, Greg McClure wrote: > Hey all. > > I suppose I'm not understanding Webware sessions very well. I'm > trying to detect if a session has expired by doing what seems > obvious: > > if self.session().isExpired(): > etc ...
Here are some quick tips that may help: * In awake() I use the following guard so that I don't create a session if one is not needed: if trans.hasSession() ... * In using sessions, I often provide a default value: userId = self.session().value('userId', None) * I see in my code I actually combine the two: userId = self.transaction().hasSession() and self.session().value('userId', None) or None I don't see anything in my apps asking about the session being expired... HTH, -Chuck ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss