Conceptually, I delegate the construction of the bean to a service object ( which is a singleton ). Then in the function that actually creates the bean, I pass in the dependancies (constructor or setter) before I return the bean. The dependancies, of course, are passed into the service at creation time.
The singleton dependancies are handled by ColdSpring and the transient dependancies are handled by calling the respective service object. DW On Thu, Apr 10, 2008 at 9:17 AM, Sam Clement <[EMAIL PROTECTED]> wrote: > I've been using Coldspring for a while now and it's great, though I > haven't really used it to do more than autowire services, gateways and > DAOs. I'm currently working on a project that doesn't use an ORM and have > come into a validation stumbling block. I'm using Brian Rinaldi's great > Illidium cfcgenerator which creates a very useful validation method on the > object's bean. I want to be able to use a gateway from within this method > to ensure that the record is unique. > > The problem for me is figuring out where to configure the gateway object. > I'd like to be able to use Coldspring to inject the gateway into the bean > (to be used by the validation method), however I think the problem is that > Coldspring is best used for singletons and not for objects created at > runtime. If that's the case, is there a better way of getting the gateway > into the bean than manually inserting it from a service? > -- "Come to the edge, he said. They said: We are afraid. Come to the edge, he said. They came. He pushed them and they flew." Guillaume Apollinaire quotes
