• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what comes first, the DAO or EJB?

 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

When using BMP with a DAO, should the client code use the DAO to persist the BMP entity bean, or should the client code access the entity bean (so that the DAO is internally used by the entity bean)?

I have seen examples both ways...is there a more preferred way?

Thanks in advance.
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BMP Entity beans uses DAO.
I don't see sense in using DAOs to call BMP Entity Beans.


Regards

Samuel
 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Samuel.

-Saha
 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Think about the concept. With BMP you will need to write all the SQL code. DAO is used to promote Database independency, therefore your BMP entity bean will use you DAO.

Imagine if you use the DAO to call the Entity Bean, when you change your database, you would need to rewrite all Entity Beans.

Regards
 
reply
    Bookmark Topic Watch Topic
  • New Topic