"Whaley, Dave (HQP)" wrote:

> I am building an application that needs to track ten objects, up to 42K
> each, for each user.  The most convenient way to do this is to store the
> objects in the session until we are ready to write them to the database.
> The app server is Weblogic 5.1.  Are there any technical limitations we will
> run into?
>
> The transaction volume is light, as well as the concurrent user load.  The
> user will be paging through differnet servlets in order to complete the
> building of the object.  The alternative way of handling the object build is
> to use the database as a "workfile".  The problem with that is finding and
> deleting abandoned work records if the user hits the cancel button.
>
> Documentation on the session object seems hard to come by.  I've checked
> Sun's Developer Connection as well as the Weblogic site.  Even books on
> Servlet programming don't talk about it much.  Where do you find out the
> nitty gritty?
>

Think of a session as a glorified Hashtable (which stores all the session
attributes in memory, until you remove them or invalidate the session, even
between requests), and remember that there will be a session instance per
simultaneously logged in user, and you know pretty much everything you need to
know about a session.  There is nothing magic going on.

For example, is your 42k per user memory space a problem?  If you have 1000
simultaneous users, that is roughly 42 megabytes.  With sufficient memory
allocated to the JVM that is running your servlet container, that should be no
problem.  If you do not have enough memory allocated, you will be guaranteed to
run into OutOfMemoryException problems.

If you want to really get down and dirty, and understand how a servlet container
implements sessions, you can look at the source code for an open source servlet
container like Tomcat <http://jakarta.apache.org/tomcat> -- the class that
implements the HttpSession interface is called
org.apache.tomcat.session.StandardSession.

>
> . . . . . . . . . . . . . . . .
> Dave Whaley
> Developer, Web Applications
> Robert Half International, Inc.
> (925) 598-5256
> . . . . . . . . . . . . . . . .
>

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to