Author: mturk Date: Sat Jan 31 18:15:02 2009 New Revision: 739581 URL: http://svn.apache.org/viewvc?rev=739581&view=rev Log: Parse the domain from session affinity mark
Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=739581&r1=739580&r2=739581&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Jan 31 18:15:02 2009 @@ -686,7 +686,7 @@ static int find_best_bydomain(jk_ws_service_t *s, lb_worker_t *p, - const char *domain, + const char *name, int *states, jk_logger_t *l) { @@ -697,7 +697,12 @@ int candidate = -1; int activation; lb_sub_worker_t wr; + const char *domain = strchr(name, '.'); + if (domain) + domain++; + else + domain = name; /* First try to see if we have available candidate */ for (i = 0; i < p->num_of_workers; i++) { /* Skip all workers that are not member of domain */ @@ -723,7 +728,6 @@ } } } - return candidate; } Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=739581&r1=739580&r2=739581&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Jan 31 18:15:02 2009 @@ -43,6 +43,11 @@ <br /> <subsection name="Native"> <changelog> + <update> + LB: If the sticky session affinity mark contains dot, treat the + part after the dot as domain name. This allows to have full node + session affinity with domain failover. (mturk) + </update> <fix> <bug>46579</bug>: Use local environment table instead environment variables for setting the JKISAPI_PATH and JKISAPI_NAME. (mturk) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org