users@glassfish.java.net

Re: How to set jvmRoute for AJP/mod_jk load balancing

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 23 Oct 2007 13:26:30 -0400

Hi Jess,

happy to see you here :-) ;-)

glassfish_at_javadesktop.org wrote:
> When using Glassfish with Apache via the AJP protocol (i.e. with mod_jk or mod_proxy_ajp), how can I achieve the equivalent of Tomcat's "jvmRoute" setting so as to obtain sticky-session load balancing?
>
> For sticky-session load balancing mod_jk and mod_proxy_ajp expect that each servlet engine they're load balancing over has a unique id, "jvmRoute". Each servlet engine is expected to append this id (with a separator in between, ":" or ".", I forget which offhand) to the end of all session ids they generate. How do I make Glassfish do this?
>
> I looked through the documentation and can find no mention of such an approach nor any clues as to how to specify a "session id suffix" or such either.
>
> [This is a critical enabling capability to incrementally move from Apache + load-balanced Tomcats to Apache + load-balanced Glassfishes. Having to switch out Apache at the same time makes moving in this direction substantively harder.]
> [Message sent by forum member 'jess_holle' (jess_holle)]

Just add, in domain.xml:

<jvm-options>jvmRoute=....</jvm-options>

I didn't test it but it should works.

Thanks

-- Jeanfrancois

>
> http://forums.java.net/jive/thread.jspa?messageID=241670
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>