I'm going to ignore the complete problem case where you have configured
Apache to be the "default servlet", and index.html is a frameset with 'n'
jsp frames (which will typically result in 'n' different sessions).  This is
why mod_webapp only supports forwardAll, and forwardAll is the default for
Ajp.

Most 3.3 methods map well to Catalina.  It's either an xxxListener or a
Valve.  This is one of the problem cases that falls through the cracks.  As
such, I personally can't see how to do this better than Costin's idea of
adding a jvmroute attribute to the Manager.  Instead, I'm going to try and
describe the programmatic requirements and hope that someone smarter than me
can see how to implement it.

Apache knows who it sent the request to, and can (and does in 3.x) pass this
information on to the Request object.  If, as it happens, that the servlet
that eventually gets executed at the end of the pipeline (or a rogue
Valve/Filter) creates a new Session (e.g. Listener), then somebody with
access to the Request object (e.g. Valve)  needs to re-set the SessionId to
be SessionId += "." +request.getJvmroute().  This has to happen before the
servlet regains control (so that response.encodeURL works), and before the
cookie is set (or at least sent).

Of course, what I care about is Apache.  However in the above you can
s/Apache/IIS/ or s/Apache/IPlanet/, and get to the same point.
----- Original Message -----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 6:09 PM
Subject: Re: Load balancing - fail-over support with mod_webapp


>
>
> On Tue, 18 Dec 2001 [EMAIL PROTECTED] wrote:
>
> > Date: Tue, 18 Dec 2001 14:14:10 -0800 (PST)
> > From: [EMAIL PROTECTED]
> > Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> > To: Tomcat Developers List <[EMAIL PROTECTED]>
> > Subject: Re: Load balancing - fail-over support with mod_webapp
> >
> > On Tue, 18 Dec 2001, Craig R. McClanahan wrote:
> >
> > > The load balancer routing from JK hasn't ever been implemented in
> > > Catalina yet.  Patches welcome :-).
> >
> > Can we get a 'setRequest' method on Manager ? I'm trying to find
> > workarounds, but that would be the simple solution.
> >
>
> In other words, a *single* "request" property for the entire Manager?
> Wouldn't that have problems when you had simultaneous requests in
> progress?
>
> Same thing would happen (but on a smaller scale) if you added setRequest
> on the session instead -- it's legal to have multiple simultaneous
> requests.
>
> > Again, adding support for load balancer is simple - the Manager just
need
> > to append the vmroute to the generated session id. How you get the
session
> > id is the problem - it is available in request, or it could be
configured
> > in server.xml if getting from the request is not possible.
> >
>
> The request (and therefore the response because they maintain mutual
> references) knows what the session id is ...  is that good enough?
>
> > ( right now I'm trying to finish jk2 asap - when I'm done I'll try again
> > to fix the lb for 40 if nobody does it before )
> >
> > Costin
> >
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to