Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

CMP Beans

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
When we use CMP entity beans to model records in relational database, we do not need the DAO, right ? (please correct me if I'm wrong).
However, how do we implement CMP entity beans if our datasource is not relational database (e.g OO db) or some legacy system (using Connectors ?) ?
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
According to sun j2ee patterns, if you�re using the new Local interfaces to implement your entity beans than you coul�d skip building the DAOs as you�re gonna do local calls on the beans, but if you�re using the remote interfaces entity beans from ejb 1.1 specifications you should consider building some DAOs to avoid the remote calls in some cases.
The next text was taken from the sun catalog:
Using lightweight entity beans under the EJB 2.0 specification. The EJB 2.0 specification introduces the notion of local interfaces, which allow clients to use entity beans without making a remote method invocation. Under this specification, a data access object can be implemented as a lightweight entity bean, whose local interface abstracts data access functionality.

you can read more at:
http://java.sun.com/blueprints/patterns/j2ee_patterns/data_access_object/index.html
regards.
 
Author
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kodo,

Originally posted by Kodo Tan:
When we use CMP entity beans to model records in relational database, we do not need the DAO, right ? (please correct me if I'm wrong).


Correct.

Originally posted by Kodo Tan:
However, how do we implement CMP entity beans if our datasource is not relational database (e.g OO db) or some legacy system (using Connectors ?) ?


You have to use BMP.
Cheers,
Matjaz
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought CMP should be able to use OO database ?
Maybe not now ? But definitely it will be able to connect to an OO database. Conceptually, it is more straight forward to use OO database.
Thanks
Ruilin
[ February 05, 2002: Message edited by: Rulin Yang ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic