[jboss-jira] [JBoss JIRA] Created: (JBAS-6389) JvmRouteValve doesn't handle domain included in jvmRoute
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Thu Jan 15 18:28:04 EST 2009
JvmRouteValve doesn't handle domain included in jvmRoute
--------------------------------------------------------
Key: JBAS-6389
URL: https://jira.jboss.org/jira/browse/JBAS-6389
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Clustering, Web (Tomcat) service
Affects Versions: JBossAS-5.0.0.GA
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-5.0.1.GA
>From a email thread, me replying to Paul Ferraro:
>> OK - I just tested this. In summary, defining the domain within the
>> route directive does not work. e.g. worker.node1.route=group1.node1
>>
>> If I use jvmRoute="node1" in server.xml, then .node1 is appended to the
>> session id, but the sessions do not stick, so subsequent requests go to
>> some other node.
>>
>> If I use jvmRoute="group1.node1" in server.xml, then .group1.node1 is
>> appended to the session id and the next request gets routed to node1
>> again (i.e. the session sticks) - but, now .group1.group1.node1 is
>> appended the session id (which is not a valid node) - so the next
>> request after this one goes to some other node.
>>
>> I would say this is a bug - but according to mladen, I'm not using
>> domains the way they were intended to be used... Thoughts?
>>
>> For now, I'll drop this section (that mentions defining domain within
>> the route directive) from the wiki page.
>>
>
> This behavior could be due to an implementation detail of the JvmRouteValve, which parses out the jvmRoute from the session id starting on the right and looking for '.' This would cause the 2nd request to > be treated as a failover, since the parsed value would be "node1" will the server.xml value is "group1.node1". The session cookie will be re-emitted, now xxx.group1.group1.node1. Next request would be
> xxx.group1.group1.group1.node1, etc.
Looking for the '.' from the right (using String.lastIndexOf() instead of indexOf()) is a minor perf optimization.
Simple solution is to look for the '.' from the left. More complex would be to count the '.' instances in the node's jvmRoute and count from the right. Or, count from the left if there is a '.' in the jvmRoute.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list