> Amy Roh wrote:
> > [EMAIL PROTECTED] 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.

IMHO, not calling expire() because no method changes isValid to false
doesn't seem like a clean approach.  Moreover,
PersistentManagerBase.processExpires() keeps expire() making it not
consistent.

Amy
>
> Rémy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to