How big do you expect your result set will be? Leaving a result set open is a bad idea - you have no idea if the user is ever coming back. To implement scrolling, I'd suggest using an auto-increment type primary key, and then use that to determine where you left off in the last group of results you sent back. Start constructing a new set of results from that point.
----- Original Message ----- From: "John C. Landers" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 24, 2002 2:01 PM Subject: [JBoss-user] Re: Jdbc Open connection/resultSets between calls. > I know this most likely doesn't sound like the best idea. > But I need to support paging of results sets. > I was asked to allow a call to a session bean > that ends up being a jdbc query only return 100 rows > at a time. > So my first thought was to return a session bean > that implements an iterator pattern but is it legal > to keep the connection open/resultSet between > calls. In order to keep the result set valid the > connection must be open. I know this will > most likely lead to a connection leak, resource > conflicts etc. > But I might implement a timeout to invalidate > the bean. > > I looked at the CachedRowSet this seems > like a good fit except it might suck up a lot of memory. > > Any other suggestions/ideas? > Has anyone else had to do this? > > Thanks, jcl. > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user