web client paging large result set

Discussions

EJB programming & troubleshooting: web client paging large result set

  1. web client paging large result set (8 messages)

    Hi all,

    How would you implement paging of large result sets for a web client?

    The client is invoking (querying) a servlet invoking a stateless session bean that performs the database query. The result set is potentially very large and I want the client to be able to fetch parts of the result set (keep a cursor open). Any ideas?

    The problem is how to keep the connection open on the server. A stateful session bean can be passivated and I would loose the cursor, right?

    A somewhat related problem: Streaming of the result set all the way from the database to the client...
  2. web client paging large result set[ Go to top ]

    can you pull the full result set into the servlet, put it into the user's session context, then implement paging in the servlet, leaving the stateless session bean alone?
  3. web client paging large result set[ Go to top ]

    No that would obviously not work for really large result sets. However, I'm thinking about selecting only rowid/keys that way. Perhaps even keeping the result set on the client...
  4. Paging through large result sets[ Go to top ]

    "Value List Handler" pattern:
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html


    "DataListHandler" pattern
    http://www.theserverside.com/resources/article.jsp?l=DataListHandler

    http://www.theserverside.com/home/thread.jsp?thread_id=13939


    article: ResultSet pagination using DB2, JDBC, and JSPs

    http://www7b.boulder.ibm.com/dmdd/library/techarticle/0307balani/0307balani.html

    DisplayTag (an open source JSP tag library)

    The DisplayTag library provides tags for displaying large data sets.

    The tag library supports: column display, sorting, paging,
    cropping, grouping, exporting, and decoration.

    http://displaytag.sourceforge.net/

    Live demo @ http://www.displaytag.org/index.jsp
  5. Paging through large result sets[ Go to top ]

    Thanks Sean!

    Sadly, none of the proposed patterns are perfect. To be a perfect solution we would need to keep the connection open. There are no real alternatives.
    One of your proposed solutions may be good enought, though. I'll have to think about what our needs really are...
  6. article: "Paging in J2EE: Manage Large Result Sets Efficiently"

    http://www.devx.com/Java/Article/21383
  7. Take a look at: http://valuelist.sourceforge.net
  8. scrollable result set[ Go to top ]

    May be scrollable resultset would help here...
  9. Paging in J2EE: Manage Large Result Sets Efficiently
    http://www.devx.com/Java/Article/21383/1954?pf=true

    jGuru: Paging with Scrollable ResultSets
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/SRS/