Filip Hanik - Dev Lists wrote:
Dave Colasurdo wrote:
*Problem1*
When testing Sticky session, my browser locks unto a particular
cluster member (e.g. node1) due to the nodeid in the cookie. If I kill
node1, the session fails over into node2 and all my session data is
still present. This is good.
The nodeid in the cookie continues to say node1 (this is also true w/
TC 5.5.9 w/ and mod-jk)..
ok, this is probably not desired behavior for a cluster with more than 2
nodes.
For this to work correctly, you need to have the JvmRouteBinderValve
configured in tomcat.
This valve, will rewrite the sessionId to include the new jvmRoute,
node2 in your scenario.
Filip
Updated the deployment plan with the new Valve (included in the Valve
Chain) and all now works as expected. After failover, the cookie is
updated with the nodeid of the new server that processes the request.
<gbean name="JvmRouteBinderValve"
class="org.apache.geronimo.tomcat.ValveGBean">
<attribute
name="className">org.apache.catalina.cluster.session.JvmRouteBinderValve</attribute>
<attribute name="initParams">
enabled=true
</attribute>
</gbean>
Will update the G1.1 plan on the wiki.
-Dave-