Yes - I want to create transients in my service objects using the bean factory, just as Peter suggests. So my question is what is the best way to get the bean factory into the service object? Or rather what are the ways people are doing this and what are the pros and cons of the various techniques?
Thanks, Anthony -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Bell Sent: Tuesday, June 19, 2007 12:52 AM To: [email protected] Subject: [coldspring-dev] Injecting the Beanfactory into Service Objects I'd imagine main reason to put bean factory into your objects is to use ColdSpring for injecting into transients. You might want to have a UserService.new() that returns a User bean via ColdSpring injected with DAO, etc. That would be a valid use case for having access to the bean factory. Is there a recommended approach? Best Wishes, Peter On 6/19/07 3:32 AM, "Sean Corfield" <[EMAIL PROTECTED]> wrote: > On 6/18/07, Anthony Israel-Davis <[EMAIL PROTECTED]> wrote: >> Is there a generally accepted way to inject the defaultXMLBeanFactory >> into objects? If not what are the various ways people are accessing >> the beanFactory in their applications? > > In general you don't need the bean factory inside your objects - you > can have ColdSpring create them all and inject them into each other as > needed.
