There's really not much overhead in having ColdSpring just instantiate them and keep them in the application scope. Unless these are gigantic components, they don't take up much RAM since there is only one copy of each one.
However, if it's really a concern, you can specify 'lazy-init="true"' on the bean definition and ColdSpring will only create it when something actually asks for the bean. I'm pretty sure this value is false by default, meaning that ColdSpring creates all the beans at startup. So setting it to true will enable lazy loading for that bean. On Nov 3, 2007 8:18 PM, Mike Kear <[EMAIL PROTECTED]> wrote: > So here's a related question. If DAOs are singletons, that's cool, I > understand that and why you'd do that. > > Across my admin application I might have a couple of dozen DAOs, some of > which would be used maybe once a month or less, others used all day every > day. I'm not sure instantiating them all at application start is a > brilliant idea (or is it?) so if it's a bad idea to instantiate them at > the > top of the page that uses them, where should I instantiate them? > > Cheers > Mike Kear > Windsor, NSW, Australia > 0422 985 585 > Adobe Certified Advanced ColdFusion Developer > AFP Webworks Pty Ltd > http://afpwebworks.com > Full Scale ColdFusion hosting from A$15/month > > > > >
