--- Robert McIntosh <[EMAIL PROTECTED]> wrote:
> >
> True, but you would have to have the ProductDao be a wrapper for 
> whatever lies underneath, which is not necessarily a bad thing :-)
> Hey, you could even have multiple persistence layers at work, and each 
> is a different 'service' that you access by name/hint. Would be a neat 
> idea...
> 
> - Robert
> 

Yes, the ProductDAO would just be an interface.  Think of the ProductDAO as an
Avalon component's ROLE class.  How you design your ROLE is dependant on how
you need to use it.

Here's an example:

The DaoManager would have a configuration (file) that would give it a dao
context, a transaction class implemetation for that context, and a list of
dao's with their corresponding implementations (or something like that):

Then when you init the DaoManager, you tell it which context to use and it will
give you the right Transaction object and the right DAO implementation
according to your configuration.  It's very similiar idea to a ServiceManager,
but it's simplified for just DAO's which means Transactions (Connections) and
the objects that use them.

jaaron

PS- Gotta run for the next couple of hours, but if anyone has any thoughts, I'd
love to discuss them.  Thanks

__________________________________________________
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]

Reply via email to