• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Situations when DAOs are not suited

 
Sridhar Raman
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would be the motivation to not use DAOs when accessing external systems or data repositories?
The use of CMP EJBs makes it unnecessary for DAOs. Are there other situations where this applies? I am trying to understand this in terms of performance and maintainability. Any input on this is much appreciated.
Thanks
Sridhar
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although wrapping database access through DAOs is conventional wisdom, think of unconventional datasources such as -
  • A push-pull messaging system.
  • An XML file received from an external source.
  • A legacy system accessed through connectors.
  • A service end point.


  • Clearly in situations like these, abstracting the nuances of data access within a DAO layer helps you encapsulate the gateway operations and provides a uniform interface for the consumers of data.
    Hope that helps,
     
    Sridhar Raman
    Ranch Hand
    Posts: 142
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks, Ajith.
    Sridhar-
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic