tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Yang <yga...@yahoo.com>
Subject Re: session expiring too quick
Date Fri, 03 Mar 2000 23:03:39 GMT
Gary Yang wrote:

> Shachor Gal wrote:
>
> >  I think that I fixed this problem yesterday. So if you will use todays
> > build it supposed to be there.
> >
> > However, the defaultSessionTimeOut in server.xml is not in use anymore,
> > instead you will need to set the session timeout in web.xml (The servlet
> > API 2.2 deployment descriptor.)
> >
> > Note that you can use TOMCAT_HOME/conf/web.xml to provide default timeout
> > for all the contexts.
> >
> > Tell me if it works (remember this should be in the latest build).
> >
> >         Gal Shachor
> >
> > On Fri, 3 Mar 2000, Eric Lebetsamer wrote:
> >
> > > I noticed this same problem.  I assumed that it is a bug in 3.1.  I had to
> > > move backwards to 3.0 to fix the problem.  Waiting for a fix.
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> Why the minium timeout is 60 seconds? From
> src/share/org/apache/tomcat/session/StandardManager.java,
>  it seems that tomcat checks all sessions each 60 seconds. Why don't you check if
> a session is time out when a new access comes?
> I mean, why don't you check it in method access() of StandardManager.java?

Sorry, here should be StandardSession.java.

>
>     public void access() {
>
>         this.lastAccessedTime = this.thisAccessedTime;
>         this.thisAccessedTime = System.currentTimeMillis();
>         this.isNew=false;
>
>         if (this.thisAccessedTime-this.lastAccessedTime >
> this.maxInactiveInterval) {
>             // timeout ....
>
>         }
>   }
>
> If use this method, the minium maxInactiveInterval can be less than 60...the unit
> can even be ms:-)
>
> ---------------------------------------------------------------------
> 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