It is pretty much useless if it simply returns the time the current request
(or a request after the current one) accessed the session. This is exactly
what JServe (1.0b3) does. It sets the lastAccessTime before calling
service(). It would be very easy to move the call that sets lastAccessTime
to occur after the call to service(). It appears that Jetty sets
lastAccessTime before it calls service() also.
Is there any use for it if it usually just returns the time the current
request accessed it?
Aaron
> -----Original Message-----
> From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 19, 1999 2:07 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Comparing Milliseconds w/ Servlets
>
>
> Jason Hunter wrote:
> >
> > Hans Bergsten wrote:
> > > I'm afraid this doesn't work since the last access time for the
> > > session is reset when the request for servlet B is
> received, before
> > > servlet B even gets a chance to look at it.
> >
> > Hmm, that's not how it should work. With the JSDK 2.1 the last
> > accessed time is the time of request "n-1".
>
> Really? The spec says:
>
> "Returns the last time the client sent a request carrying
> the identifier
> assigned to the session, or -1 if the session is new."
>
> 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.
>
> --
> 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