Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

what comes first, the DAO or EJB?  RSS feed

 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks, Samuel.

-Saha
 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!