You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antonio Petrelli <an...@gmail.com> on 2008/02/04 20:41:57 UTC

[OT] Re: DAO pattern

2008/2/4, Zhang, Larry (L.) <lz...@ford.com>:
> Sorry if this is not too on topic.
>
> I have a user object whose data is from three resources: Db2, LDAP, and
> other flat file. Per dao pattern, do you think I should have three daos
> or one dao to encapsulate the data access implications?

It depends.
If you can have the user object from one source at a time, then the
best approach IMHO is one interface/3 implementations.
If you are getting this user object from these sources at the same
time, use one DAO, and manage connections inside it.

Ciao
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org