Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

CMP and paging ?

 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Would anyone happen to know whether the JDBC spec supports paging for CMP(either the current 2.1 spec or the future 3.0) ?
Namely, supposing you have a *huge* table of products, and need you ProductHome to have a method for fetching them, say, 50 each time.
Is this supported for CMP ? I don't seem to find a reference to it in EJB-QL.
If, as I suspcet, it's not supported - what is the recommended approach ?
1) Keep the Product bean with CMP , where only the problematic (page-fetching) method gets a manual implemetation, based on JDBC (with vendor-specific paging) ?
2) Make ProductBean a BMP ?
3) Give up on entity beans alltogether, and manage persistance using either JDBC , or other frameworks such as Hibernate ?

Thank you very much
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, I mean to aske whether the *EJB* spec (not JDBC) supports paging.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is outside the current spec. Different vendors (for instance IBM with WebSphere) do support this, but it will be done in a vendor-dependent way.

Kyle
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for replying.

Could you please indicate how this feature is supported in Websphere ? Have they added some special EJB-QL keyword for it ?

Thanks again.
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic