import-bot (20211) [Avatar] Offline
[Originally posted by purav]

Can You Pleas let me know the difference between Data Access Object and EJB??
When we should go for DAO and when not??
import-bot (20211) [Avatar] Offline
Re: DAO v/s EJB
[Originally posted by crazybob]

DAO and EJB are completely different. A DAO (data access object) abstracts the
implementation from the business logic. A DAO enables you to swap out your
implementation without impacting your business logic. You may implement a DAO
with entity
beans, JDBC, JDO, etc.
import-bot (20211) [Avatar] Offline
Re: DAO v/s EJB
[Originally posted by batate]

I'd also add that many tools generate DAO+JDBC code, and many people that use
DAO use it in context with a JDBC solution.

I'd say that DAO+JDBC is useful when you have a relatively static database
model, and if your data model is relatively close to your ultimate object
model. If either of these is not true, then a persistence framework like JDO
is important for its mapping flexibility.