You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Klimek <da...@seznam.cz> on 2003/01/05 18:25:27 UTC

mod_jk: Disable sticky sessions

Hello,

I would like to use mod_jk as simple loadbalancer without sticky sessions.

Is there any way to disable sticky sessions in mod_jk?

I don't have jvmRoute atribute set but sessions are always sticky.

I'm using
	mod_jk-1.3-eapi.so
	apache 1.3.26
	jboss-3.0.4_tomcat-4.1.12

Thanks a lot for any hint
David

-- 
http://www.sweb.cz/david.klimek


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: mod_jk: Disable sticky sessions

Posted by Tim Funk <fu...@joedog.org>.
In server.xml:
Set cookies="false" for your application context.
Eg: (Taken from sample config from 4.1.18)
<Context className="org.apache.catalina.core.StandardContext" 
crossContext="true" reloadable="false" 
mapperClass="org.apache.catalina.core.StandardContextMapper" 
useNaming="true" debug="0" swallowOutput="false" privileged="false" 
wrapperClass="org.apache.catalina.core.StandardWrapper" 
docBase="examples" cookies="false" path="/examples" 
cachingAllowed="true" 
charsetMapperClass="org.apache.catalina.util.CharsetMapper">

This should turn cookies off for sessions. If you do not URL encode your 
sessions - then there will be no way for users to be sticky.

The bad part is - every request will allocate a new HttpSession. (If 
request.getSession(true) is used or every JSP does not contain the 
command to not not create a session. )

-Tim


David Klimek wrote:
> Hello,
> 
> I would like to use mod_jk as simple loadbalancer without sticky sessions.
> 
> Is there any way to disable sticky sessions in mod_jk?
> 
> I don't have jvmRoute atribute set but sessions are always sticky.
> 
> I'm using
>     mod_jk-1.3-eapi.so
>     apache 1.3.26
>     jboss-3.0.4_tomcat-4.1.12
> 
> Thanks a lot for any hint
> David
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>