• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Basic DAO question

 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic