Mike,

A couple of dozen DAOs shouldn't break the bank.  I'd just go ahead and
instantiate them.

Having said that, Coldspring does have a "lazy" attribute that tells the
framework to only instantiate a bean when needed.  It doesn't work in CS
1.0, but I believe somebody (Mark Mandel?) submitted a fix to CVS, so if
you're happy to check out the latest version it should be in there.  Course,
after a couple of months you'll have all your DAOs in memory anyway, but
whose server stays up for a couple of months? (OK, OK, I don't really want
to know...)

Jaime Metcher

> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of Mike Kear
> Sent: Sunday, 4 November 2007 10:18 AM
> To: [email protected]
> Subject: [coldspring-dev] When to instantiate DAOs?
>
>
> 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
>
>
>
>
>



Reply via email to