Jason Hunter wrote:
>
> Hans Bergsten wrote:
>
> > "Returns the last time the client sent a request carrying the
> > identifier assigned to the session, or -1 if the session is new."
>
> It's kind of like when it *is* Friday and you say "last Friday" which
> one are you referring to? :-)
>
> > To me this means it has to be reset every time the engine receives a
> > request that includes the session ID; the current request is the "last
> > time" a request for the session was received.
> >
> > Maybe I'm missing something here, so please correct me if I'm wrong.
> > To return the time for the previous request (n-1) the engine must have
> > "look back" feature, i.e. remember when the previous request was
> > received and set the last accessed time to this value when it
> > receives the current request. That sounds a bit convoluted to me.
>
> The implementation has to a bit convoluted (involving two vars), but
> n-1 is the only thing that's useful, and it's the way JSDK 2.1 is
> implemented. When the spec's unclear we should go with the JSDK
> reference impl.
>
> BTW, if the server returned the time at which you *just* called
> getSession() then the -1 wouldn't make much sense.
Well, if the session is new no request with this session ID has been
received so -1 would be appropriate. Note that it's not calling
getSession that sets the time stamp, it's when the request with a
valid session ID is received.
Anyway, if this is the way it's implemented in the JSDK I'll buy your
argument, but it needs to be clarified in the spec.
James, are you listening?
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html