tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardManager.java
Date Wed, 10 Dec 2003 01:49:20 GMT
Amy Roh wrote:
> remm@apache.org wrote:
> 
>> remm        2003/12/05 01:28:55
>>
>>   Modified:    catalina/src/share/org/apache/catalina/session
>>                         StandardManager.java
>>   Log:
>>   - isValid already expires sessions, so backgroundProcess shouldn't call
>>     expire again.
> 
> isValid doesn't *always* expire session.
 >
> StandardSession.isValid() -
> 
> public boolean isValid() {
> 
>         if (this.expiring){
>             return true;
>         }
> 
>         if (!this.isValid ) {
> ***         return false;
>         }
> 
>         if (maxInactiveInterval >= 0) {
>             long timeNow = System.currentTimeMillis();
>             int timeIdle = (int) ((timeNow - lastAccessedTime) / 1000L);
>             if (timeIdle >= maxInactiveInterval) {
> ***             expire(true);
>             }
>         }
> 
>         return (this.isValid);
>     }
> 
> If StandardSession.isValid is false, then we want to expire the session. 
>  However, isValid() call doesn't get to expire(true) and just return 
> false.  So removing session.expire() from 
> StandardManager.processExpires() won't work all the time.  Am I missing 
> something?

There doesn't seem many methods changing isValid to false. invalidate is 
another one, and it calls expire. As long as all the methods which 
invalidate the session right away expire them, it should be ok I think.

Rémy


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


Mime
View raw message