tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Is it possible to expire jvmRoute cookie
Date Mon, 10 Dec 2012 22:28:03 GMT
Hash: SHA256


On 12/10/12 3:37 PM, Konstantin Kolinko wrote:
> 2012/12/10 Christopher Schultz <>:
>> If the Valve is configured at the Engine or Host level, will the
>> call to getSession know what webapp's session should be fetched?
>> Obviously, Tomcat figures this out eventually, but I was
>> wondering if that resolution has been done before the host- or
>> engine-level valves are invoked.
> The Context to which the request maps to is known from requestURI
> + mapper. (Regardless of where the valve is configured).

Great, thanks.

>>> See also  org.apache.catalina.ha.session.JvmRouteBinderValve, 
I think that may be the right place for this to ultimately live, but
>> developing separately probably makes sense for now.
> I do not think such feature belongs to Tomcat itself. I think it'd
> be better to do at the balancer (to ignore jvmRoute occasionally).

The problem is that the balancer (e.g. mod_jk) doesn't know if the
session id is valid without forwarding it to the Tomcat instance with
the specified jvmroute. If you haven't already done so, please take a
quick look back at the earlier posts in this thread to see the
evolution of this proposal.

Briefly, we were looking for something that would not require any
changes to the balancer software (specifically, mod_jk and
mod_proxy_ajp) so that it could be fixed in one version of one product

Fixing this in the balancer would require either a) a ping-style
session-checking message to be designed and implemented in both the
balancer and Tomcat or b) a custom HTTP response code from Tomcat that
would trigger a re-balance at the balancer level. I'm sure there are
other possibilities, but these were the ones I initially proposed.

> If balancer sends request to a different Tomcat, tomcat can deal
> with it thanks to JvmRouteBinderValve and like it deals with the
> usual fail-over scenario.

Of course. The Tomcat that eventually receives the (possibly
re-balanced) request should not behave any differently than now.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with undefined -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message