tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Changing session timeout for a webapp via JMX or internal Tomcat API?
Date Thu, 01 Dec 2011 10:57:57 GMT
On 30/11/2011 11:14, Ellecer Valencia wrote:
> Thanks Igor. I made a mistake though.  I actually meant  "modifying web.xml
> and restarting the webapp."
> We want to find a way to change session timeouts - even for existing
> sessions - without doing a restart of the webapp.

I don't see an obvious way to do that using Tomcat provided components.
You could certainly add your own implementation to do it, & expose this
over JMX.


> I know there's also a server-level session timeout in tomcat's
> /conf/web.xml but that would 1.affect all webapps (we only want to affect
> the older version - foo##001) and requires tomcat restart (we are
> trying to reduce downtime for users)
> Ellecer
> On Wednesday, November 30, 2011, Igor Cicimov <> wrote:
>> On Wed, Nov 30, 2011 at 4:11 PM, Ellecer Valencia <>
> wrote:
>>> Is there a way to change session timeouts in tomcat via JMX? I've only
>>> seen the operation called "expireSession", but not one that can change
>>> the session timeout period.
>>> The only way I've found so far to modify session timeouts is by
>>> modifying web.xml and restarting Tomcat.
>>> However, in our intended usage, we don't want to restart Tomcat and
>>> kick out users.
>>> We're looking at using parallel deployment in Tomcat 7, and so we'll
>>> have a situation with
>>> foo##001 -- old version
>>> foo##002 -- new version
>>> What we want to do is decrease timeouts in foo##001, so that users
>>> move to foo##002 sooner and allow us to get rid of the old version.
>>> I've had a look at the Manager MBean and there's operations to get the
>>> existing session IDs and to expire individual sessions, but not to
>>> change their timeouts (unless I've gone blind and there was something
>>> there staring me in the face!).
>>> Is there any way - either another MBean in Tomcat or by accessing
>>> Tomcat API - to change the session timeouts for a webapp? Someone told
>>> me that Weblogic has this feature, so maybe it's not impossible to do
>>> it in Tomcat (just speculating)
>>> Ellecer
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> For additional commands, e-mail:
>> Can't you just restart the application you are changing the timeout for?
>> Why do you need to restart the whole server?



View raw message