RE: Session terminate
RE: Session terminate
- Subject: RE: Session terminate
- From: <email@hidden>
- Date: Thu, 19 May 2005 09:38:43 +0200
- Thread-topic: Session terminate
A few more thoughts:
Session timeout happens on a specific thread. You could check for the thread name in Session.terminate().
Session timeout happens outside the request-response loop. Thus Session.context() should be null in the event of a timeout.
Pierre
-----Original Message-----
From: webobjects-dev-bounces+pierre.bernard=email@hidden
[mailto:webobjects-dev-bounces+pierre.bernard=email@hidden]On
Behalf Of Pierre Frisch
Sent: Tuesday, May 17, 2005 9:05 PM
To: Mark Ritchie
Cc: email@hidden
Subject: Re: Session terminate
If you are into private methods you can overwrite _terminateByTimeout
() and get whatever action you want there.
public void _terminateByTimeout()
Pierre
On 17-May-05, at 9:44 AM, Mark Ritchie wrote:
> On May 17, 2005, at 12:16 PM, Sébastien Gruhier wrote:
>
>> I have overriden the terminate function in Session but how do I
>> know if the call is done by a timeout?
>>
>
> I have an icky way to do this... I'd love to find a cleaner
> solution if anyone has one.
> < mutters something about private ivars and no accessor methods... >
>
> If you print out Session's toString(), you should see something
> like _wasTimedOut
> followed by true or false. (Note that there are spacing issues
> around _wasTimedOut).
> In my implementation of terminate(), I parse the toString() and
> check the flag.
> Did I mention that this was a terrible way to find out if you've
> been terminated by a
> timeout but it works for me. Tested under: WOF 5.2.3, OSX 10.2.8
> This is very likely to be effected by version / platform / phase of
> the moon changes. :-)
>
> Good luck!
> Mark.
> __
> Mark Ritchie, email@hidden 416-843-5479
> Software Developer, Apple Certified Developer Trainer
> WebObjects, Cocoa, Mac OS X and Mac OS X Server
> Diamond Lake Consulting Inc., Toronto, Ontario, Canada
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40spearway.com
>
> This email sent to email@hidden
>
>
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden