I think the idea is to cache the check and not rerun it on every request, which could be wasteful. It is a trade off. I'd probably use onRequestStart, and cache the last check time, and only check once an hour. Maybe. :)
On 1/14/07, Richard Cooper <[EMAIL PROTECTED]> wrote: > Hi, > > I've seen a few examples where this happens, but, I'm a little confused as to > why you'd use cftry/cfcatch to test for a DB connection within > onApplicationstart. > > Firstly, would this mean that until the application ends it would consider > that the database is unreachable? > > Secondly, what happens when the DB goes down later on, after the application > has started? Wouldn't it be better to have this test within onRequestStart? > > Lastly (and slightly separately), if I store client details in a DB and this > connection is down I'm assuming this problem would occur prior to the > onApplicationStart? Would it be best to wrap that in try/catch as well or > perhaps even instead of? > <cftry> > <cfset this.clientStorage = "cvars"> > etc... > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266551 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

