Ashok MAdhavan wrote:

> Hi guys,
>
> I would like to access an object across servlets in a session. one way
> would be store the object along with your session and we can retrieve
> it.But the object is slightly big and there is one object per session
> and there are many concurrent users. so the session object might become
> large.this might become a load on the server.
> is there any other way of accessing of object across servlets in a
> session.
>
> EXPECTING YOUR REPLIES,
>
> M.Ashok
>

Well, one approach might be to store just the information needed to recreate
the object in your session.  For example, if the data for it comes from a
database, you could store just the primary keys, and then re-read all the data
every time.

There is a tradeoff here, though -- you are going to make each request take
longer, if it takes much time to reconstruct the object on each request.  You
might be better off just buying more memory and increasing the heap size of
your JVM.

Craig McClanahan

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to