I'm using Hibernate and DTO for annotation mapping. I have DAO objects for persistance of these objects. My question is. How should I access the DAO objects.
Should I instantiate the DAO or is there some pattern on how to wrap the DAO?
SCJP1.4
dennis zined
Ranch Hand
Joined: Mar 07, 2003
Posts: 330
posted
0
You'll probably have a service layer in your application which you could inject dao components via Spring framework. In your spring config, inject DAOs into your service component and expose service methods to your UI. Your code will probably look like this:
hope this helps.
SCJP 1.4<br />SCWCD 1.4
Mathias Nilsson
Ranch Hand
Joined: Aug 21, 2004
Posts: 366
posted
0
Thank you!
Not to familiar with spring but i'll look into it. To many new framworks for me right now , Wicket, Hibernate, Maven, Struts2 and the list goes on. But I have read about the Service Layer and seems like a good id�.