You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Tom Anderson <ta...@infonow.com> on 2003/02/10 00:24:54 UTC

StandardSession.getLastAccessedTime()

Can anyone explain to me why the getLastAccessedTime() method returns 
the PREVIOUS accessed time?   The Java docs for HttpSession suggest 
this should be the "last time the client sent a request associated with 
this session".  To me, that means it should be updated to the current 
time when access() is called.   So why does the access() method set it 
to the previous time?

The reason I ask is that I noticed some unexpected behavior with 
respect to PersistenceManagerBase and decided it was because of the 
return from getLastAccessedTime().   Specifically, if you let a session 
sit past maxIdleSwap then hit that session one time, it still swaps out 
right away because the previous time was longer than maxIdleSwap.

~Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org