Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / October 2004

Tip: Looking for answers? Try searching our database.

What is the difference between a BMP EntityBean and a DAO ?

Thread view: 
Lars Willich - 16 Oct 2004 11:15 GMT
As I read in a couple of articles a BMP (Bean Managed Persistence is an EntityBean
where the programmer has to care about the SQL statements.
On the other side a DAO implements  the direct access to an SQL database.

But isn't that the same?
What are the differences ?

Lars
Michael Borgwardt - 16 Oct 2004 19:36 GMT
> As I read in a couple of articles a BMP (Bean Managed Persistence is an EntityBean
> where the programmer has to care about the SQL statements.
> On the other side a DAO implements  the direct access to an SQL database.

Actually, neither necessarily uses SQL, though it's of course the most
common case.

> But isn't that the same?
> What are the differences ?

IMO the main difference is that a DAO isn't necessarily an EJB. i.e.
Entity Beans that use BMP are a special kind of DAO.
Paul & Neelam Checknita - 17 Oct 2004 05:31 GMT
You're not really comparing the like with the like.  A DataAccessObject is a
core J2EE pattern -- among other things, it abstracts potentially
vendor-specific calls to a database from business objects.  A
DataAccessObject could be utilized with something like BMP.  A BMP
EntityBean is an entity object that manages its own persistence.  Which
means that the bean implements its own persistence by including
JDBC/SQLJ/etc right in the entity bean methods.

See the following article, which explains it in further detail,
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

NC

> As I read in a couple of articles a BMP (Bean Managed Persistence is an EntityBean
> where the programmer has to care about the SQL statements.
[quoted text clipped - 4 lines]
>
> Lars


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.