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.


Thanks, Samuel.

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.


This thread has been viewed 655 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 16, 2018 04:13:09.