tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: [off topic] - passing a ResultSet from a servlet to a JSP
Date Wed, 30 Apr 2003 13:12:51 GMT

Howdy,

>This technique is fairly ok, if the resultset is expected to be approx.
>1000 records.
>If you have 10.000 records with size of 100 Bytes each, you have 1 MB
>sitting in request.setAttribute() and passed to the JSP. This 1 MB gets
>garbage collected some seconds later by the JVM.

As a side note, allocating and destroying 1MB is nothing for modern
JVMs.

But I agree that his (I forget the original poster's name) overall
approach may be flawed if his result sets are very large.  I wasn't
trying to completely redesign his app.  I was only pointing out the
potential dangers of passing around the ResultSet itself rather than a
bean (or a partial bean with a scrollable cursor, or some other more
high-performance) object.

Each webapp tends to have different requirements for this, and different
allowances for response time, server memory usage, etc.  So the
solutions tend to be different.  If you're interested in help for your
particular design, feel free to post the whole problem, in a separate
thread ;)

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message