This is interesting Craig. I am wondering though what exactly ou mean by the
3rd item:
> * In a distributable app, requests that are not part of a session can
> be served by any copy of the app. However, if your request is part
> of a session, all requests that are part of that session
> *at a particular
> point in time* must be served from the same JVM.
I mean, my understanding of how session fail-over works is that when a
request comes in, it can hit any server in the farm because the HttpSession
is replicated to each of the servers in the farm. So I am not sure what it
means by "request is part of a session"? My only thought is that if the
request has already been started processing on the server..its tied to that
server until the response goes back..meaning that if that server died, that
request is NOT sent to another server..its lost. However, if I am correct in
understanding that, that means that if the same user submits another request
and the initial server that created the users session is no longer
available, the users request is sent to another server in the farm and does
not see any difference on their end..the 2nd server has the same HttpSession
objects for that user as did the one that is no longer available. Is this
correct?
> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 22, 2001 9:21 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Session Object
>
>
> Anis Kasmani wrote:
>
> > Hi All,
> >
> > Just a though. Does the Java session object faces the same
> problem as an ASP
> > Session object in a webfarm situation. Is it advisable to
> use the session
> > object for a WebFarm scenario.
> >
> > I am not sure wheter the Session class provided with the
> servlet engine can
> > work over a webfarm where the request might be served by
> different App
> > Servers machines.
> >
> > Any suggestion/pointers would be appreciated. Thanx in advance
> >
>
> The servlet 2.2 specification includes the following requirements:
>
> * If you declare your application to be distributable in the web
> application deployment descriptor (web.xml) file by using the
> <distributable> element, the app server may run a copy of your
> app in multiple different JVMs. If you do *not* declare your app
> to be distributable, this is not allowed.
>
> * In a distributable app, all session attributes your app
> stores in the
> session must implement java.io.Serializable.
>
> * In a distributable app, requests that are not part of a session can
> be served by any copy of the app. However, if your request is part
> of a session, all requests that are part of that session
> *at a particular
> point in time* must be served from the same JVM.
>
> The effect of these rules is that, in most circumstances, you
> don't need to
> worry a
> lot about the fact that your app is being used in a "web
> farm" environment. If
> the
> app server supports session migration, for example, it can
> only do so *between*
> requests. The hardest part (from the developer's viewpoint)
> is ensuring that
> all
> your session attributes are Serializable.
>
> NOTE: some app servers impose an additional requirement (not
> based on the
> specs)
> that servlet context attributes (i.e. application scope beans in JSP
> terminology)
> must also be Serializable in a distributed app scenario.
>
> >
> > Anis
> >
>
> Craig McClanahan
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets