Well I was about to create a simple factory but instead I just changed the type to "any" for the newsDAO argument in my newsService. Now I can switch my dao's in my CS config as I please without needing an additional factory.
Im not quite sure if this is good practice but it saves extra work and I guess coldfusion has loose typing for a reason! On 3/24/06, Kurt Wiersma <[EMAIL PROTECTED]> wrote: > You can do that by editing the CS config file. My guess is you want to > decide which one to inject at run time based on another config parameter, > correct? If that is the case then you might want to create your own factory > which get configured first and call that factory through CS to get the right > DAO to inject into your service. > > --Kurt > > On 3/23/06, Patrick Lebon <[EMAIL PROTECTED]> wrote: > > I have a service (newsService) that accepts "model.new.newsDAO" as an > > argument, however I want to be able to inject it with either > > "model.new.newsDAO_XML" or "model.new.newsDAO_MSSQL" via coldspring. > > Im not exactly sure I understand factory support in coldspring so I > > wanted to know if this was possible at the moment or do I need to > > create my own DAO factory comonent? > > > > > >
