• Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity Beans x DAO

 
Gustavo Adolpho Bonesso
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where to use Entity Beans instead of Data Access Objetcs ? What�s the benefits of doing this way ?
Thanks !
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The purpose of Data Access Object is separate the data access code (SELECT,INSERT,UPDATE) code from th business logic. You can use it with BMP or session beans. It is easy to switch over to a different data store with no change in business logic.
 
Sean Sullivan
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is answered in Rod Johnson's J2EE book
title: "expert one-on-one J2EE Design and Development"
author: Rod Johnson
http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep,
My company actually use DAOs for persisting objects which are not EJBs.
DAOs in our interpretation are lightweight as it uses direct JDBC.
Pho
 
Sean Sullivan
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pho Tek,
How do you demaracte transactions?
You may be interested in my web site:
http://daoexamples.sourceforge.net/
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pho Tek:
My company actually use DAOs for persisting objects which are not EJBs.
Pho

So can i infer from this that you guys dont map certain tables to Entity beans?. If there are certain entities (beans) that have a relationship with one of those tables, do you guys persist the beans using CMP and the rest using JDBC?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!