On 2/12/06, Baz <[EMAIL PROTECTED]> wrote: > > > So just to clear some things up with Coldspring working with Reactor: > > 1. Should all Reactor objects be defined in CS and ONLY called through CS in > your apps?
I would only have the DAOs and Gateways defined in CS. The record objects you can create yourself inside your service cfc. You can make service object get injected with the reactorFactory. > 2. The createRecord object in Reactor is dependent on reactor's createDAO > object - but I think this dependency is handled by Reactor... does this mean > we don't define that dependency in CS? I believe that dependence is handled by Reactor so you should be fine. It works in the sample app I built. > 3. If I had a reactor bean defined in CS like this: > > <bean id="Website" factory-bean="reactorFactory" > factory-method="createRecord"> > <constructor-arg name="name"><value>Website</value></constructor-arg> > </bean> > > Can I use that bean as a dependency for another object, just like I would > any other bean? Yes that should work. I don't recommend having CS manager record objects for you. At a minium you have issingleton="false" in the above config. > 4. Before using Reactor, I had a Customer bean with a getCountOrders() > method that used a dependent OrderGateway cfc to return the count. To mimic > this using CS & Reactor, should I build a new object called CustomerService > that handles this dependency since you can't build dependencies into Reactor > objects? (or can u?) Yes I would recommend using a service object to hide the implementation of the persistence layer from the rest of your app. I hope that answers your questions. :) Let me know if you need any more info. --Kurt
