1 Reply Latest reply on Jul 18, 2002 12:21 PM by shs96c

    CMP Entity beans and the Page-by-Page Iterator Design Patter

    panosk

      Can i use the 'Page-by-Page Iterator Design Pattern' with CMP Entity beans?

      I have a cmp entity bean named NodeBean and a value class named Node. I want to return Pages of Node objects to the client. What is the best way to do it?

        • 1. Re: CMP Entity beans and the Page-by-Page Iterator Design Pa
          shs96c

          There's no reason you can't use CMP EJBs to do this, but there are a couple of draw backs, notably that EJB-QL doesn't support ORDERing results (though you can do it with a JBoss extension to the language) so you'll have to do it in your app.

          Perhaps you could use JDBC to query the underlying DB, navigate the ResultSet to the beginning of your current page, create the appropriate Data Transfer Objects and then return them.