Further to Craig's comments, if you are using JDBC 1.0 you will not be able
to cursor backwards within your resultset so if that's something you want to
do, dump the data into an appropriate data bean that you can move back and
forth through.  I've created a glorified Vector object structure I use for
most of my data needs that provides me one generic storage bean and
everything I need to access the data rows as I need to.

Please don't ask me to provide my code for it here.  I can't release it to
others.  Create a version for your own needs.

Dan

> ----------
> From:         Craig R. McClanahan[SMTP:[EMAIL PROTECTED]]
> Reply To:     Craig R. McClanahan
> Sent:         Monday, November 15, 1999 9:49 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: JDBC from JSP
>
> "Loganathan, Kamalesh" wrote:
>
> > My application is a reporting & monitoring application. Personally, I
> don't
> > want to use any database related classes in jsp page. Instead, I would
> like
> > to create report (wrapper ?) beans and use them in the page.  But,
> should I
> > create a bean for each row (entity) or use a manager bean as wrapper
> class
> > for resultset ??
> >
> > Any comments ??
> >
>
> If you are using the ResultSet, either directly or indirectly via a
> wrapper bean,
> there are some implications:
>
> * The ResultSet must remain open (potentially across multiple
>   requests if you allow the user to scroll forwards and backwards
>   by pages like a search engine does).
>
> * Therefore, the Statement from which this ResultSet was created
>   must remain open.
>
> * Therefore, the Connection from which this Statement was created
>   should remain exclusively allocated to this user (to avoid problems
>   with transactional commits and rollbacks affecting the results).
>
> On the other hand, if you create business object beans to represent your
> results,
> you can close the ResultSet and Statement, and return the connection to
> your
> connection pool, as soon as the query completes.  This can substantially
> increase
> the number of users your application can support with a given number of
> connections.
>
> Craig McClanahan
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to