users@glassfish.java.net

Re: Troubles with Applet when load-balander is enabled

From: Kshitiz Saxena <Kshitiz.Saxena_at_Sun.COM>
Date: Mon, 22 Feb 2010 18:51:45 +0530

Hi,

Load-balancer uses the value of cookie JROUTE instead of JSESSIONID to
decide which instance will serve the request. Can you force applet to
send value of that cookie as part of subsequent request? In general
subsequent requests must send all cookies present in responses from
application server.

Thanks,
Kshitiz

On Monday 22 February 2010 06:43 PM, glassfish_at_javadesktop.org wrote:
> Hi,
>
> I run a simple applet which uses HttpURLConnection to connect to a servlet.
> It basically works like this:
> 1. Applet calls servlet
> 2. Servlet sends Applet the value of request.getSession().getID as binary data
> 3. Applet appends ;JSESSIONID=value to every subsequent server call
>
> It worked ok with some old version of Weblogic, but now after migrating to Glassfish it seems the load balancer doesn't handle the session-id provided through the URL, because it distributes the requests round-robin instead to the server where the session was actually created.
> Because the Servlet is stateful, it breaks :-/
>
> Is there any way to tell the Glassfish Load Balancer to keep track of a Session-ID provided through the URL?
>
> Thank you in advance, Clemens Eisserer
> [Message sent by forum member 'linuxhippy' (linuxhippy_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=387989
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>