Searching - Large Result Sets - Design Pattern Needed


EJB design: Searching - Large Result Sets - Design Pattern Needed

  1. Are there any patterns for handling large result sets? Let's say I am searching on Amazon for something, and there are 10,000 matches, but let's say only items 20-30 should be displayed. Do I first bring in all into a Vector then pull out 20-30? That doesn't seem right. Do I have a method which get's the result set and just does next() for all the records I don't want? Looking for pointers.
  2. check out petstore's PagedList pattern. if u look under
    docs/patterns/ there should be an explanation to it.

  3. Where would one find "docs/patterns"? On this web site?
  4. whoops sorry for being terse.

    1) get the j2ee petstore blueprint from sun.
    2) unzip it
    3) look under jps1.1.1/docs/pattern/