I finally choose to use a SessionBindingListener, the other possibility was to rewrite in tomcat the call to the SessionListener in order to attach a copy of the Session to the event before destroying the session...
Frank AFRIAT ----- Original Message ----- From: "Milt Epstein" <[EMAIL PROTECTED]> To: "Frank AFRIAT" <[EMAIL PROTECTED]> Sent: Friday, July 19, 2002 4:20 PM Subject: Re: Impossible to calculate session duration ? > On Tue, 2 Jul 2002, Frank AFRIAT wrote: > > > Hi ! > > > > I wanted to calculate session duration so I created a Session > > Listener waiting for a sessionDestroyed() Event. > > But when I want to calculate Session Duration with > > session.getCreationTime(), I get the exception : > [ ... ] > > I assume you figured out that the problem here is that this event > occurs *after* the session is destroyed, not before. Did you ever > figure out a good solution? > > I suppose one semi-kludgey thing to do is put an attribute in the > session when it's created, and use Session Binding Listener and look > for a valueUnbound event instead. > > But I need to do something similar and was wondering if you came > across any other good possibilities. > > Thanks. > > Milt Epstein > Research Programmer > Systems and Technology Services (STS) > Campus Information Technologies and Educational Services (CITES) > University of Illinois at Urbana-Champaign (UIUC) > [EMAIL PROTECTED] > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
