"Craig R. McClanahan" wrote:

> Yuki Tanabe wrote:
>
>
> (3)    STORE ENTIRE RESULT SET IN SESSION
>     AND DYNAMICALLY GENERATE THE PAGES
>
> If you can store the results of your query as a Java collection object of some sort
> in the user's session, then you know exactly how many pages you will need, and you
> can create them on the fly.  As you create a page of the response, you would add
> "Previous" and "Next" links at the bottom, which would pass in a parameter that
> says which page number you want.  The page generator uses that to know how many
> rows to skip before starting to generate the currently requested page.
>
> If you are reading data from a database (via JDBC) to create your response, it is
> tempting to just store the java.sql.ResultSet containing your results in the
> session.  This is going to cause scalability problems, however, because it requires
> leaving the corresponding statement open across multiple HTTP queries (and can
> cause things like running out of database cursors).  You are better off copying the
> data into some "disconnected" collection class.

What java class could you offer as "disconnected" collection class ?
I want to have method in it to fill it from ResultSet.
And I want that it implements ResultSet interface to use it instead original JDNC
ResultSet.
If there is no such a class I will make it then.

--
My best regards,
Vitaly Lipovetsky.
Head of software development department
First Ukrainian Intl bank

___________________________________________________________________________
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