Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic DAO question  RSS feed

 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that DAO can be used as follows :
EJB > DAO > Database.
Can it be used as follows. Is this right ??:
EJB > DAO > Some other External System
Examples of external systems are like SMTP/another application.
 
Rajeshwari Natarajan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The primary reason for using the DAO pattern is to separate the business and the data access logic.
The datastore can be anything - database like Oracle, SQL Server, flat files, XML etc.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not like EJB -> DAO
DAO's are retrieved from a pattern introduced by Sun when i remember correct. You normally use this class for accessing data layer. CMP EJB's are a different way of accessing Data in your ressource (e.g. database).
In J2EE Applications with EJB you often use DAO's for retrieving a bigger amount of Data, cause it is faster than using EJB's.
You can get more info about the DAO Pattern here
Hope that helped
Olli
[ June 08, 2003: Message edited by: Oliver Refle ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!