Forums Register Login

JPA and DAO

+Pie Number of slices to send: Send

Hi,

While using JPA, do we still need to use DAO class to connect DB or we can very well connect to database stright away from JPA class itself.

Regards,
kumar
+Pie Number of slices to send: Send
You'll still want to go through a DAO. The DAO pattern is still valid, although there is some debate about that.

Here's a little tutorial on DAOs and Hibernate/JPA that you might find interesting:

Hibernate JPA Entities and the DAO Design Pattern
+Pie Number of slices to send: Send
In your application if you want to use different datasources then dao is an option.Otherwise if your application has to access data from just one database then Dao would't make much sense.
+Pie Number of slices to send: Send
 

guru prasanth wrote:In your application if you want to use different datasources then dao is an option.Otherwise if your application has to access data from just one database then Dao would't make much sense.



Dao is good way in isolate DB/LDAP (even with JPA). Application/service layer does not need to know what's "back there".
+Pie Number of slices to send: Send
Using DAO will be help even in JPA specially in case of multiple DataSources.
+Pie Number of slices to send: Send

Thanks All , I plan to have DAO Layer in my JPA implementation.

Regards,
Kumar
+Pie Number of slices to send: Send

Should we need to have JSF Backed Bean in the Class Diagram and Sequence Diagram, I thought of not to mention it, as its part of the framework. Kindly please through some light on this.

Regards,
Kumar
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1582 times.
Similar Threads
DAO connection
why DAO?
Need your opinions on this !
DAO and Entity class
Dao Layer design
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:47:18.