> From: Mike Engelhart [mailto:[EMAIL PROTECTED]]
> How do you figure that using sessions doesn't allow a site to
> scale up?  I
> mean, I can easily see needing SMP, 1GB of RAM and 5 machines for load
> balancing but where are you getting that information from? As
> for sessions
> timing out, that's a good thing. It's trivial to just make
> any servlets use
> request.getSession(false) and if the result is null, redirect
> them to a page
> that explains that the session is timed out, why that is the
> way it is and
> then that they need to start from the beginning of the application.

I'm pretty sure any memory overhead per client session will dramatically
effect scalability.  That's why EJB SessionBeans have the ability to
"passivate themselves" to free up memory during heavy load conditions.  One
deficiency of servlet sessions is that there is no notification (callback)
when the session times out.  If there was, this notification could be used
to store the session data in the database, for example.  That way, the
session timeout interval could be made small to increase scalability.  As it
is, to be highly scalable we're forced into not using session data for
multi-page form situations--instead we need to write this information to the
database on every form submission.  Setting the timeout interval to a small
value just isn't practical since the user loses their work too easily.
Keeping the session data in hidden form fields would work, but this is
really messy.

mark

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to