Grr... replied to the wrong email! My comments below should have been in the Avalon DAO thread:
--- Laurent Rieu <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have considered implementing the DAO pattern using Avalon for a long time > now, as this pattern provides some real benefits. You are right when you're > talking about a common interface which provides clients with > implementation-agnostic services such as findContract(contractId), > updateUser(user)... Multiple implementations could then be plugged. I have > myself used such an architecture where a common interface had two distinct > implementations, one used JDBC to access a DB, one used JCS to access a > mainframe. Both implementations did some mapping from the data repository > to a common object model. The clients just used the common interface and > object model, without even knowing they were talking with a DB or a > mainframe. > > Now, as I'm investigating Merlin container, I think your idea sounds good > but looks like what I have done before. I would like a more dynamic > configuration using Merlin (or Fortress ?) capabilities. I mean, what about > having a DAOManager registered which would be capable of handling a > specific lifecycle extension, such as DAOCapable (or a base DAO interface > could be used as the extension). Every DAO implementation could declare > this extension, and be automaticlly registred with a given hint (or > whatever parameter could be useful) by the Manager at deployment time, > provided (I haven't given it a close look) there is a way to pass specific > parameters for a given component during lifecycle extension. > > Laurent > --- J Aaron Farr <[EMAIL PROTECTED]> wrote: > Comments below... > > This is definitely along the lines of what I was thinking of. I have one app > that has one implementation that connects to an Oracle XSQL servlet, while > another implementation uses a mix of JNDI and regular JDBC. In either case, > the client code works it out. > > The thing is, a DaoManager of this sort is really a small container in and of > itself. It could be implemented using Fortress or Merlin I think, but I want > to keep it light weight enough that it could be used either as just another > component in a larger Avalon based app, or used outside of Avalon (so it > would > have to handle it's own lifecycle or something like that). > > One way to do this is to extend one of the current containers and customize > it > to be a DaoManager. Or one could write a simplier DaoManager that handled > the > lifecyles of the DAOs. I'm not sure which is best. > > jaaron > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
