struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <>
Subject [OT] Re: DAO pattern
Date Mon, 04 Feb 2008 19:41:57 GMT
2008/2/4, Zhang, Larry (L.) <>:
> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message