[Logo]
Forums Register Login
what comes first, the DAO or EJB?
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.
BMP Entity beans uses DAO.
I don't see sense in using DAOs to call BMP Entity Beans.


Regards

Samuel
Thanks, Samuel.

-Saha
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
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 636 times.

All times above are in ranch (not your local) time.
The current ranch time is
Sep 18, 2018 17:43:08.