You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gabriele Garuglieri <ga...@infoblu.it> on 2003/03/13 12:25:49 UTC

mod_jk: sticky_session deaults to 0 and not to 1 as documented.

Tomcat 4.1.21
connectors 4.1.21
Apache/2.0.44 (Unix) mod_jk/1.2.3-dev

If sticky_session property is not declared it defaults to 0 and not 1 as 
documented.
Migrating a working load balancing 4.1.12 configuration to 
mod_jk/1.2.3-dev gets calls distributed between the workers group 
members, breaking the load balancer, unless i declare sticky_session=1 
in the load balancer worker.

You can easily see in the code that if the property is not declared it 
defaults to JK_FALSE.

int jk_get_is_sticky_session(jk_map_t *m,
                            const char *wname) {
    int rc = JK_TRUE;
    char buf[1024];
    if (m && wname) {
        int value;
        sprintf(buf, "%s.%s.%s", PREFIX_OF_WORKER, wname, STICKY_SESSION);
        value = map_get_int(m, buf, 0);
        if (!value) rc = JK_FALSE;
    }
    return rc;
}

Putting line
value = map_get_int(m, buf, 0);
to
value = map_get_int(m, buf, 1);
makes everything working as documented.

Need to open a bug?

Regards,  Gabriele.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org