You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Arun Prasad R <fi...@gmail.com> on 2004/09/10 06:04:56 UTC

Can session time be modified at runtime?

hi

in web.xml the following comment has been given
  <!-- You can set the default session timeout (in minutes) for all newly   -->
  <!-- created sessions by modifying the value below.                       -->

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

after changing session-timeout will it be effective for sessions
created thereafter?

anyone clarify

arun

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


Re: Can session time be modified at runtime?

Posted by Arun Prasad R <fi...@gmail.com>.
hi

if i don't control in application, 
so i can not do session.setMaxInactiveInterval(600);

but for that application i experience frequent timeout. is there any
other way, so that i need not to restart tomcat

arun

On Fri, 10 Sep 2004 11:59:39 +0100, Mike Fowler
<to...@mlfowler.com> wrote:
> You could use the session instance method setMaxInactiveInterval which
> takes a single int paramter which is the maximum time in seconds between
> client requests before invalidation.
> 
> For example, for ten minute timeout:
> 
> session.setMaxInactiveInterval(600);
> 
> 
> -Mike Fowler
> "I could be a genius if I just put my mind to it, and I,
> I could do anything, if only I could get 'round to it"
> 
> 
> 
> Tim Funk wrote:
> > The session timeout can be changed at runtime (sort of). If you change
> > web.xml - you would need to restart your webapp. This would cause a
> > brief outage while sessions are saved to ???. (Unless your using
> > clustering)
> >
> > If you really need this changed on the fly, this might be able to be
> > changed via JMX. (But I haven't checked)
> >
> > -Tim
> >
> > Arun Prasad R wrote:
> >
> >> hi
> >>
> >> in web.xml the following comment has been given
> >>   <!-- You can set the default session timeout (in minutes) for all
> >> newly   -->
> >>   <!-- created sessions by modifying the value
> >> below.                       -->
> >>
> >>     <session-config>
> >>         <session-timeout>30</session-timeout>
> >>     </session-config>
> >>
> >> after changing session-timeout will it be effective for sessions
> >> created thereafter?
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

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


Re: Can session time be modified at runtime?

Posted by Mike Fowler <to...@mlfowler.com>.
You could use the session instance method setMaxInactiveInterval which 
takes a single int paramter which is the maximum time in seconds between 
client requests before invalidation.

For example, for ten minute timeout:

session.setMaxInactiveInterval(600);


-Mike Fowler
"I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it"

Tim Funk wrote:
> The session timeout can be changed at runtime (sort of). If you change 
> web.xml - you would need to restart your webapp. This would cause a 
> brief outage while sessions are saved to ???. (Unless your using 
> clustering)
> 
> If you really need this changed on the fly, this might be able to be 
> changed via JMX. (But I haven't checked)
> 
> -Tim
> 
> Arun Prasad R wrote:
> 
>> hi
>>
>> in web.xml the following comment has been given
>>   <!-- You can set the default session timeout (in minutes) for all 
>> newly   -->
>>   <!-- created sessions by modifying the value 
>> below.                       -->
>>
>>     <session-config>
>>         <session-timeout>30</session-timeout>
>>     </session-config>
>>
>> after changing session-timeout will it be effective for sessions
>> created thereafter?
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

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


Re: Can session time be modified at runtime?

Posted by Tim Funk <fu...@joedog.org>.
The session timeout can be changed at runtime (sort of). If you change 
web.xml - you would need to restart your webapp. This would cause a brief 
outage while sessions are saved to ???. (Unless your using clustering)

If you really need this changed on the fly, this might be able to be changed 
via JMX. (But I haven't checked)

-Tim

Arun Prasad R wrote:
> hi
> 
> in web.xml the following comment has been given
>   <!-- You can set the default session timeout (in minutes) for all newly   -->
>   <!-- created sessions by modifying the value below.                       -->
> 
>     <session-config>
>         <session-timeout>30</session-timeout>
>     </session-config>
> 
> after changing session-timeout will it be effective for sessions
> created thereafter?
> 

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