Abandon .. err invalidate .. err release?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Abandon .. err invalidate .. err release?

Boris Popov, DeepCove Labs (SNN)
From the WebAppDevGuide documentation,

"In general, it is a good idea to end the client's session using abandon or
invalidate, otherwise the servlet container preserves the client's session
state until a timeout occurs"

Let's look at the code, shall we?

invalidate
  self abandon

abandon
  self release

release
  super release.
  webSite isNil ifFalse: [webSite removeSessionWithKey: key]

Cute, isn't it? ;)

Why couldn't we just have #release and remove the ambiguity from the
documentation? It offers two options (identical, it turns out) and provides
no further guidance as to what the difference is (obviously, because there
doesn't seem to be any).

On a similar note, some of our servlets are just one-time request-response
session-less dummies, but there doesn't seem to be any clean way to define
that and have it suppress the cookie setting in #setSessionKey. Any ideas?
We don't want to do too much overriding there, but we will if we need to.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Abandon .. err invalidate .. err release?

Boris Popov, DeepCove Labs (SNN)
I'm going to make a wild guess and say that this has something to do with
JSP and ASP naming conventions perhaps? We could still get rid of one of the
three then :)

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

-----Original Message-----
From: Boris Popov [mailto:[hidden email]]
Sent: Monday, July 10, 2006 11:17 AM
To: [hidden email]
Subject: Abandon .. err invalidate .. err release?

From the WebAppDevGuide documentation,

"In general, it is a good idea to end the client's session using abandon or
invalidate, otherwise the servlet container preserves the client's session
state until a timeout occurs"

Let's look at the code, shall we?

invalidate
  self abandon

abandon
  self release

release
  super release.
  webSite isNil ifFalse: [webSite removeSessionWithKey: key]

Cute, isn't it? ;)

Why couldn't we just have #release and remove the ambiguity from the
documentation? It offers two options (identical, it turns out) and provides
no further guidance as to what the difference is (obviously, because there
doesn't seem to be any).

On a similar note, some of our servlets are just one-time request-response
session-less dummies, but there doesn't seem to be any clean way to define
that and have it suppress the cookie setting in #setSessionKey. Any ideas?
We don't want to do too much overriding there, but we will if we need to.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Abandon .. err invalidate .. err release?

Alan Knight-2
Yes, that's precisely it. JSP uses invalidate. ASP uses abandon. Smalltalk convention is to use release. There are a number of such things in WebToolkit, where ASP and JSP have different terminology for equivalent operations, and we support both. I suppose we could get rid of the more Smalltalk-ish terminology, but that doesn't seem very polite to people who are actually used to Smalltalk conventions.

At 02:47 PM 7/10/2006, Boris Popov wrote:

>I'm going to make a wild guess and say that this has something to do with
>JSP and ASP naming conventions perhaps? We could still get rid of one of the
>three then :)
>
>Cheers!
>
>-Boris
>
>--
>+1.604.689.0322
>DeepCove Labs Ltd.
>4th floor 595 Howe Street
>Vancouver, Canada V6C 2T5
>
>[hidden email]
>
>CONFIDENTIALITY NOTICE
>
>This email is intended only for the persons named in the message
>header. Unless otherwise indicated, it contains information that is
>private and confidential. If you have received it in error, please
>notify the sender and delete the entire message including any
>attachments.
>
>Thank you.
>
>-----Original Message-----
>From: Boris Popov [mailto:[hidden email]]
>Sent: Monday, July 10, 2006 11:17 AM
>To: [hidden email]
>Subject: Abandon .. err invalidate .. err release?
>
> From the WebAppDevGuide documentation,
>
>"In general, it is a good idea to end the client's session using abandon or
>invalidate, otherwise the servlet container preserves the client's session
>state until a timeout occurs"
>
>Let's look at the code, shall we?
>
>invalidate
>  self abandon
>
>abandon
>  self release
>
>release
>  super release.
>  webSite isNil ifFalse: [webSite removeSessionWithKey: key]
>
>Cute, isn't it? ;)
>
>Why couldn't we just have #release and remove the ambiguity from the
>documentation? It offers two options (identical, it turns out) and provides
>no further guidance as to what the difference is (obviously, because there
>doesn't seem to be any).
>
>On a similar note, some of our servlets are just one-time request-response
>session-less dummies, but there doesn't seem to be any clean way to define
>that and have it suppress the cookie setting in #setSessionKey. Any ideas?
>We don't want to do too much overriding there, but we will if we need to.
>
>-Boris
>
>--
>+1.604.689.0322
>DeepCove Labs Ltd.
>4th floor 595 Howe Street
>Vancouver, Canada V6C 2T5
>
>[hidden email]
>
>CONFIDENTIALITY NOTICE
>
>This email is intended only for the persons named in the message
>header. Unless otherwise indicated, it contains information that is
>private and confidential. If you have received it in error, please
>notify the sender and delete the entire message including any
>attachments.
>
>Thank you.
>
>

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross