Sorry I may be a bit late in responding to this, but there is another
trade-off you could potentially make.
You could have a session-bound bean for a particular query that stores
the SQL (or enough info about the SQL Select to reconstruct it) and the
first and last rows displayed. If the user moves to the next page, you
re-submit the query, tossing the first n rows, displaying the next p
rows and then cancel()'ing the query.
The downside of the above is the overhead of processing and tossing the
initial rows, which could put some strain on your network & server....
The upside is that you minimize memory usage on the server.
-=- D. J.
"Donald E. Vandenbeld" wrote:
> Yes, the resultset beans that I use have a session scope so they are dealt
> with when the user either logs out or times out. The problem is one of
> scalability. There are a a few resultset beans that could potentially be
> quite large. If you multiply this by the number of users on the system at
> any time, the memory usage could get out of hand. Being that we are an
> underfunded educational institute, it's not likely we're going to get a
> memory upgrade for our server any time soon :-)
>
> My 'solution' right now looks something like this. Each resultset bean is
> going to be associated with a specific webpage (jsp). I will have a section
> of code at the beginning of every jsp in the site that checks the name of
> the current jsp page and deletes any resultset beans that are not associated
> with the current page. I will just <jsp:include> this source at the
> beginning of each page which isn't that big an issue since I'm including
> lots of small files in every page anyway (to create formatting tables,
> headers, etc).
>
> Thanks to everyone who offered their thoughts on this.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets