"Jigar S. Shah [I]" wrote:

> Hi
> I have a query regarding sessions
>
> Can I store a resultset object retrieved from a database as a session
> object and then retrieve it back
>

You can do it, but you'll probably be sorry ...

The reason is that a ResultSet object is tied to the execution of a
particular Statement, on a particular Connection.  The only way to avoid
getting interference from other users of your application would be to allocate
a connection to the user in their session, and keep it allocated until they
are done with the result set.  This limits the number of simultaneous users to
the number of connections you can have open.

A better strategy would be to copy the result set into your own object(s) to
be stored in the session, and release the database resources used to create
them.


>
> Thanks
> JIgar
>

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