On Tue, 1 Mar 2005 17:21:18 -0800, Greg McClure wrote:
>=A0Hey all.
>
>=A0I suppose I'm not understanding Webware sessions very well. I'm
>=A0trying to detect if a session has expired by doing what seems
>=A0obvious:
>
>=A0if self.session().isExpired():
>=A0etc ...
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 =3D self.session().value('userId', None)
* I see in my code I actually combine the two:
=09=09=09userId =3D 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
|